diff options
Diffstat (limited to 'os-plugins/plugins/Theme')
11 files changed, 50 insertions, 22 deletions
diff --git a/os-plugins/plugins/Theme/OpenSLX/OSPlugin/Theme.pm b/os-plugins/plugins/Theme/OpenSLX/OSPlugin/Theme.pm index 5975fa3f..b029919e 100644 --- a/os-plugins/plugins/Theme/OpenSLX/OSPlugin/Theme.pm +++ b/os-plugins/plugins/Theme/OpenSLX/OSPlugin/Theme.pm @@ -78,6 +78,16 @@ sub getAttrInfo default => 30, }, + 'theme::name' => { + applies_to_systems => 1, + applies_to_clients => 0, + description => unshiftHereDoc(<<' End-of-Here'), + the name of the theme to apply (or unset for no theme) + End-of-Here + content_regex => undef, + content_descr => undef, + default => undef, + }, }; } diff --git a/os-plugins/plugins/Theme/XX_Theme.sh b/os-plugins/plugins/Theme/XX_Theme.sh index 81d2a729..c1814d6f 100644 --- a/os-plugins/plugins/Theme/XX_Theme.sh +++ b/os-plugins/plugins/Theme/XX_Theme.sh @@ -2,17 +2,17 @@ # # stage3 part of 'Theme' plugin - the runlevel script # -if ! [ -e /initramfs/plugin-conf/Theme.conf ]; then - exit 1 -fi -. /initramfs/plugin-conf/Theme.conf +if [ -e /initramfs/plugin-conf/Theme.conf ]; then + . /initramfs/plugin-conf/Theme.conf + if [ $Theme_active -ne 0 ]; then + [ $DEBUGLEVEL -gt 0 ] && echo "executing the 'Theme' os-plugin ..."; + +# testmkd /mnt/var/lib/openslx/themes/displaymanager +# testmkd /mnt/var/lib/openslx/bin +# [ -d /usr/share/themes/displaymanager ] \ +# && cp -a /usr/share/themes/displaymanager \ +# /mnt/var/lib/openslx/themes -if ! [ -n $active ]; then - exit 0 + [ $DEBUGLEVEL -gt 0 ] && echo "done with 'Theme' os-plugin ..."; + fi fi - -echo "executing the 'Theme' os-plugin ..."; - -# nothing to do here, really - -echo "done with 'Theme' os-plugin ..."; diff --git a/os-plugins/plugins/Theme/init-hooks/05-have-kernelvars/Theme.sh b/os-plugins/plugins/Theme/init-hooks/05-have-kernelvars/Theme.sh index c2d4551a..48c08581 100644 --- a/os-plugins/plugins/Theme/init-hooks/05-have-kernelvars/Theme.sh +++ b/os-plugins/plugins/Theme/init-hooks/05-have-kernelvars/Theme.sh @@ -1,10 +1,10 @@ # splashy stuff seems to depend on /proc/fb with VESA!? # only activate with kernel option quiet if grep -E "(VESA|VGA)" /proc/fb > /dev/null 2>&1 \ - && grep -qi " quiet " /proc/cmdline > /dev/null 2>&1; then + && grep -qi " quiet " /proc/cmdline > /dev/null 2>&1 ; then export Theme_nosplash=0 else export Theme_nosplash=1 fi -[ ${Theme_nosplash} = 0 ] && /bin/splashy boot 2>/dev/null +[ ${Theme_nosplash} -eq 0 ] && /bin/splashy boot 2>/dev/null diff --git a/os-plugins/plugins/Theme/init-hooks/15-have-ip-config/Theme.sh b/os-plugins/plugins/Theme/init-hooks/15-have-ip-config/Theme.sh index 6a3b0737..357db1fc 100644 --- a/os-plugins/plugins/Theme/init-hooks/15-have-ip-config/Theme.sh +++ b/os-plugins/plugins/Theme/init-hooks/15-have-ip-config/Theme.sh @@ -1 +1 @@ -[ ${Theme_nosplash} = 0 ] && /bin/splashy_update "progress 15" 2>/dev/null +[ ${Theme_nosplash} = 0 ] && /bin/splashy_update "progress 15" >/dev/null 2>&1 diff --git a/os-plugins/plugins/Theme/init-hooks/25-have-network-root/Theme.sh b/os-plugins/plugins/Theme/init-hooks/25-have-network-root/Theme.sh index 043d58d0..a0e4c7a9 100644 --- a/os-plugins/plugins/Theme/init-hooks/25-have-network-root/Theme.sh +++ b/os-plugins/plugins/Theme/init-hooks/25-have-network-root/Theme.sh @@ -1 +1 @@ -[ ${Theme_nosplash} = 0 ] && /bin/splashy_update "progress 25" 2>/dev/null +[ ${Theme_nosplash} = 0 ] && /bin/splashy_update "progress 25" >/dev/null 2>&1 diff --git a/os-plugins/plugins/Theme/init-hooks/40-started-hw-config/Theme.sh b/os-plugins/plugins/Theme/init-hooks/40-started-hw-config/Theme.sh index 7b56298b..934162c5 100644 --- a/os-plugins/plugins/Theme/init-hooks/40-started-hw-config/Theme.sh +++ b/os-plugins/plugins/Theme/init-hooks/40-started-hw-config/Theme.sh @@ -1 +1 @@ -[ ${Theme_nosplash} = 0 ] && /bin/splashy_update "progress 40" 2>/dev/null +[ ${Theme_nosplash} = 0 ] && /bin/splashy_update "progress 40" >/dev/null 2>&1 diff --git a/os-plugins/plugins/Theme/init-hooks/50-have-layered-fs/Theme.sh b/os-plugins/plugins/Theme/init-hooks/50-have-layered-fs/Theme.sh index 77505155..6801826d 100644 --- a/os-plugins/plugins/Theme/init-hooks/50-have-layered-fs/Theme.sh +++ b/os-plugins/plugins/Theme/init-hooks/50-have-layered-fs/Theme.sh @@ -1 +1 @@ -[ ${Theme_nosplash} = 0 ] && /bin/splashy_update "progress 50" 2>/dev/null +[ ${Theme_nosplash} -eq 0 ] && /bin/splashy_update "progress 50" >/dev/null 2>&1 diff --git a/os-plugins/plugins/Theme/init-hooks/60-have-servconfig/Theme.sh b/os-plugins/plugins/Theme/init-hooks/60-have-servconfig/Theme.sh index a305e1b9..9a21f208 100644 --- a/os-plugins/plugins/Theme/init-hooks/60-have-servconfig/Theme.sh +++ b/os-plugins/plugins/Theme/init-hooks/60-have-servconfig/Theme.sh @@ -1 +1 @@ -[ ${Theme_nosplash} = 0 ] && /bin/splashy_update "progress 60" 2>/dev/null +[ ${Theme_nosplash} = 0 ] && /bin/splashy_update "progress 60" >/dev/null 2>&1 diff --git a/os-plugins/plugins/Theme/init-hooks/70-before-plugins/Theme.sh b/os-plugins/plugins/Theme/init-hooks/70-before-plugins/Theme.sh index f96bf7da..96603a5a 100644 --- a/os-plugins/plugins/Theme/init-hooks/70-before-plugins/Theme.sh +++ b/os-plugins/plugins/Theme/init-hooks/70-before-plugins/Theme.sh @@ -1 +1 @@ -[ ${Theme_nosplash} = 0 ] && /bin/splashy_update "progress 70" 2>/dev/null +[ ${Theme_nosplash} = 0 ] && /bin/splashy_update "progress 70" >/dev/null 2>&1 diff --git a/os-plugins/plugins/Theme/init-hooks/80-after-plugins/Theme.sh b/os-plugins/plugins/Theme/init-hooks/80-after-plugins/Theme.sh index 4a749752..2e976ac5 100644 --- a/os-plugins/plugins/Theme/init-hooks/80-after-plugins/Theme.sh +++ b/os-plugins/plugins/Theme/init-hooks/80-after-plugins/Theme.sh @@ -1 +1,19 @@ -[ ${Theme_nosplash} = 0 ] && /bin/splashy_update "progress 80" 2>/dev/null +if [ ${Theme_nosplash} -eq 0 ]; then + + /bin/splashy_update "progress 80" >/dev/null 2>&1 + + # make the splashy_update binary available in stage4 ... + mkdir -p /mnt/var/lib/openslx/bin + cp -a /bin/splashy_update /mnt/var/lib/openslx/bin + + # ... and create a runlevelscript that will stop splashy somewhere near + # the end of stage4 + d_mkrlscript init splashy.stop "Stopping Splashy ..." + echo -e "\t/var/lib/openslx/bin/splashy_update exit 2>/dev/null \ + \n\ttype killall >/dev/null 2>&1 && killall -9 splashy \ + \n\trm -f /var/lib/openslx/bin/splashy_update 2>/dev/null" \ + >>/mnt/etc/${D_INITDIR}/splashy.stop + d_mkrlscript close splashy.stop "" + D_INITSCRIPTS="${D_INITSCRIPTS} splashy.stop" + +fi
\ No newline at end of file diff --git a/os-plugins/plugins/Theme/init-hooks/99-handing-over/Theme.sh b/os-plugins/plugins/Theme/init-hooks/99-handing-over/Theme.sh index 92bd6572..7a2c5856 100644 --- a/os-plugins/plugins/Theme/init-hooks/99-handing-over/Theme.sh +++ b/os-plugins/plugins/Theme/init-hooks/99-handing-over/Theme.sh @@ -1 +1 @@ -[ ${Theme_nosplash} = 0 ] && /bin/splashy_update "progress 100" 2>/dev/null +[ ${Theme_nosplash} -eq 0 ] && /bin/splashy_update "progress 100" >/dev/null 2>&1 |
