From 8f22f3842f17843242d58e8f36daf0e3e1ecc8b4 Mon Sep 17 00:00:00 2001 From: princeofgiri Date: Fri, 14 Oct 2016 09:09:31 +0700 Subject: [PATCH 1/5] remove cbatticon for computer without battery --- scripts/b-i-setup-fs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/b-i-setup-fs b/scripts/b-i-setup-fs index 95f79ff..e0053a5 100644 --- a/scripts/b-i-setup-fs +++ b/scripts/b-i-setup-fs @@ -211,6 +211,11 @@ if [ -f $ROOTFS/target/etc/apt/sources.list.d/local.list ];then rm -f $ROOTFS/target/etc/apt/sources.list.d/local.list fi +###### Remove cbatticon for PC +if [ ! -d /sys/class/power_supply/BAT0 ] && [ ! -d /sys/class/power_supply/BAT1 ];then + rm -f $ROOTFS//etc/xdg/autostart/cbatticon.desktop +fi + ###### HOME if [ -f /tmp/fstab ];then From 4b0561d56cfab9c6779817bc8115d24b8df676c9 Mon Sep 17 00:00:00 2001 From: princeofgiri Date: Fri, 14 Oct 2016 09:25:45 +0700 Subject: [PATCH 2/5] remove cbatticon when there's battery and cbatticon.deskto file --- scripts/b-i-setup-fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/b-i-setup-fs b/scripts/b-i-setup-fs index e0053a5..c7a5db7 100644 --- a/scripts/b-i-setup-fs +++ b/scripts/b-i-setup-fs @@ -212,7 +212,7 @@ if [ -f $ROOTFS/target/etc/apt/sources.list.d/local.list ];then fi ###### Remove cbatticon for PC -if [ ! -d /sys/class/power_supply/BAT0 ] && [ ! -d /sys/class/power_supply/BAT1 ];then +if [ ! -d /sys/class/power_supply/BAT0 ] && [ ! -d /sys/class/power_supply/BAT1 ] && [ -f $ROOTFS//etc/xdg/autostart/cbatticon.desktop]; then rm -f $ROOTFS//etc/xdg/autostart/cbatticon.desktop fi From 655518cddda36cd84a419edd1055fab9b93c8327 Mon Sep 17 00:00:00 2001 From: princeofgiri Date: Fri, 14 Oct 2016 09:39:27 +0700 Subject: [PATCH 3/5] missing 'target' path --- scripts/b-i-setup-fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/b-i-setup-fs b/scripts/b-i-setup-fs index c7a5db7..f2f1439 100644 --- a/scripts/b-i-setup-fs +++ b/scripts/b-i-setup-fs @@ -212,8 +212,8 @@ if [ -f $ROOTFS/target/etc/apt/sources.list.d/local.list ];then fi ###### Remove cbatticon for PC -if [ ! -d /sys/class/power_supply/BAT0 ] && [ ! -d /sys/class/power_supply/BAT1 ] && [ -f $ROOTFS//etc/xdg/autostart/cbatticon.desktop]; then - rm -f $ROOTFS//etc/xdg/autostart/cbatticon.desktop +if [ ! -d /sys/class/power_supply/BAT0 ] && [ ! -d /sys/class/power_supply/BAT1 ] && [ -f $ROOTFS/target/etc/xdg/autostart/cbatticon.desktop]; then + rm -f $ROOTFS/target/etc/xdg/autostart/cbatticon.desktop fi ###### HOME From 31f8e4bf933f3a8e35c37af7d2d4df77c872f2a5 Mon Sep 17 00:00:00 2001 From: princeofgiri Date: Fri, 14 Oct 2016 16:18:43 +0700 Subject: [PATCH 4/5] fix typo error --- scripts/b-i-setup-fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/b-i-setup-fs b/scripts/b-i-setup-fs index f2f1439..cb4b017 100644 --- a/scripts/b-i-setup-fs +++ b/scripts/b-i-setup-fs @@ -212,7 +212,7 @@ if [ -f $ROOTFS/target/etc/apt/sources.list.d/local.list ];then fi ###### Remove cbatticon for PC -if [ ! -d /sys/class/power_supply/BAT0 ] && [ ! -d /sys/class/power_supply/BAT1 ] && [ -f $ROOTFS/target/etc/xdg/autostart/cbatticon.desktop]; then +if [ ! -d /sys/class/power_supply/BAT0 ] && [ ! -d /sys/class/power_supply/BAT1 ] && [ -f $ROOTFS/target/etc/xdg/autostart/cbatticon.desktop ]; then rm -f $ROOTFS/target/etc/xdg/autostart/cbatticon.desktop fi From a31311d604a315e04920363f15d6b7cf7e22b736 Mon Sep 17 00:00:00 2001 From: princeofgiri Date: Fri, 14 Oct 2016 16:20:11 +0700 Subject: [PATCH 5/5] fix missing ] and [ --- scripts/b-i-setup-fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/b-i-setup-fs b/scripts/b-i-setup-fs index cb4b017..814f1b9 100644 --- a/scripts/b-i-setup-fs +++ b/scripts/b-i-setup-fs @@ -179,7 +179,7 @@ if [ -f /run/locale ];then fi ###### gnome settings overrides -if [ -f /usr/share/glib-2.0/schemas/blankon.gschema.override && -f /usr/bin/glib-compile-schemas ];then +if [ -f /usr/share/glib-2.0/schemas/blankon.gschema.override ] && [ -f /usr/bin/glib-compile-schemas ];then cp /usr/share/glib-2.0/schemas/blankon.gschema.override $ROOTFS/target/usr/share/glib-2.0/schemas/blankon.gschema.override do_chroot /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/ fi