diff options
author | Michael Janczyk | 2008-03-27 18:03:55 +0100 |
---|---|---|
committer | Michael Janczyk | 2008-03-27 18:03:55 +0100 |
commit | c732cc5cd3b18c13908deb1dfdc0343fd4135a2f (patch) | |
tree | 49d07c319c0da61b56b61923f8db3bf279f399e9 | |
parent | * Changed check of syscall from die() to warn() in order to let the caller (diff) | |
download | core-c732cc5cd3b18c13908deb1dfdc0343fd4135a2f.tar.gz core-c732cc5cd3b18c13908deb1dfdc0343fd4135a2f.tar.xz core-c732cc5cd3b18c13908deb1dfdc0343fd4135a2f.zip |
New plugin concept: Default theme and splashy binaries moved to plugin. Makefile modified: removed copy of splashy, theme dir shouldn't be copied either after display theme and pxe theme have been moved as well. Added support of own themes in config-path/plugins/bootsplash/themes. New init-hooks added, not really necessary. A few cosmetic corrections ->styleguide
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1702 95ad53e4-c205-0410-b2fa-d234c58c8868
19 files changed, 49 insertions, 34 deletions
@@ -142,7 +142,6 @@ supported."; \ -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/tpm \ -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/initramfs \ -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/busybox \ - -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/splashy \ -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/squashfs \ -p $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/ramfstools \ -p $(SLX_BUILD_PATH)$(SLX_PRIVATE_PATH)/config/default/initramfs \ @@ -204,7 +203,6 @@ supported."; \ $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/busybox/; \ cp -pP tools/{ddcprobe,915resolution}{,.x86_64,.i586} \ $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/ramfstools; \ - cp -p tools/splashy{,_update} $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/splashy/; \ cp -p tools/mksquashfs $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/squashfs/; \ cd initramfs/tpm; tar --exclude=.svn -cp * | \ tar -xp -C $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/share/tpm/; \ diff --git a/os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm b/os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm index aab314ea..efffed0e 100644 --- a/os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm +++ b/os-plugins/plugins/bootsplash/OpenSLX/OSPlugin/bootsplash.pm @@ -19,6 +19,8 @@ use warnings; use base qw(OpenSLX::OSPlugin::Base); +use File::Path; + use OpenSLX::Basics; use OpenSLX::Utils; @@ -30,6 +32,8 @@ sub new name => 'bootsplash', }; + mkpath("$openslxConfig{'config-path'}/plugins/bootsplash/themes"); + return bless $self, $class; } @@ -116,20 +120,31 @@ sub copyRequiredFilesIntoInitramfs my $attrs = shift; my $makeInitRamFSEngine = shift; - my $themeDir = "$openslxConfig{'base-path'}/share/themes"; + my $bootsplashDir = "$openslxConfig{'base-path'}/lib/plugins/bootsplash"; + my $bootsplashConfigDir = "$openslxConfig{'config-path'}/plugins/bootsplash"; my $bootsplashTheme = $attrs->{'bootsplash::theme'} || ''; + my $splashyThemeDir = ''; + if ($bootsplashTheme) { - my $bootsplashThemeDir = "$themeDir/$bootsplashTheme/bootsplash"; + my $bootsplashThemeDir = "$bootsplashDir/files/themes/$bootsplashTheme"; + my $altThemeDir = "$bootsplashConfigDir/themes/$bootsplashTheme"; if (-d $bootsplashThemeDir) { - my $splashyPath = "$openslxConfig{'base-path'}/share/splashy"; + $splashyThemeDir = "$bootsplashThemeDir"; + } + elsif (-d $altThemeDir) { + $splashyThemeDir = "$altThemeDir"; + } + if (-d $splashyThemeDir) { + my $splashyPath = "$bootsplashDir/files/bin"; +print "6. $splashyPath"; $makeInitRamFSEngine->addCMD( - "cp -p $splashyPath/* $targetPath/bin/" + "cp -p $splashyPath/splashy* $targetPath/bin/" ); $makeInitRamFSEngine->addCMD( "mkdir -p $targetPath/etc/splashy" ); $makeInitRamFSEngine->addCMD( - "cp -a $bootsplashThemeDir/* $targetPath/etc/splashy/" + "cp -a $splashyThemeDir/* $targetPath/etc/splashy/" ); } } diff --git a/os-plugins/plugins/bootsplash/XX_bootsplash.sh b/os-plugins/plugins/bootsplash/XX_bootsplash.sh index 4a27dafa..10a3abc2 100644 --- a/os-plugins/plugins/bootsplash/XX_bootsplash.sh +++ b/os-plugins/plugins/bootsplash/XX_bootsplash.sh @@ -6,21 +6,20 @@ . /etc/distro-functions . /etc/sysconfig/config if [ -e /initramfs/plugin-conf/bootsplash.conf ]; then - . /initramfs/plugin-conf/bootsplash.conf - if [ $bootsplash_active -ne 0 ]; then - if [ ${no_bootsplash} -eq 0 ]; then - # make the splashy_update binary available in stage4 ... - testmkd /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 "" - fi - fi + . /initramfs/plugin-conf/bootsplash.conf + if [ $bootsplash_active -ne 0 ]; then + if [ ${no_bootsplash} -eq 0 ]; then + # make the splashy_update binary available in stage4 ... + testmkd /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 "" + fi + fi fi diff --git a/tools/splashy b/os-plugins/plugins/bootsplash/files/bin/splashy Binary files differindex ad5b0ad2..ad5b0ad2 100755 --- a/tools/splashy +++ b/os-plugins/plugins/bootsplash/files/bin/splashy diff --git a/tools/splashy_update b/os-plugins/plugins/bootsplash/files/bin/splashy_update Binary files differindex 0a7be6c8..0a7be6c8 100755 --- a/tools/splashy_update +++ b/os-plugins/plugins/bootsplash/files/bin/splashy_update diff --git a/theming/openslx/bootsplash/config.xml b/os-plugins/plugins/bootsplash/files/themes/openslx/config.xml index 16080a07..16080a07 100644 --- a/theming/openslx/bootsplash/config.xml +++ b/os-plugins/plugins/bootsplash/files/themes/openslx/config.xml diff --git a/theming/openslx/bootsplash/themes/openslx/blank.ttf b/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/blank.ttf index e69de29b..e69de29b 100644 --- a/theming/openslx/bootsplash/themes/openslx/blank.ttf +++ b/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/blank.ttf diff --git a/theming/openslx/bootsplash/themes/openslx/openslx.png b/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/openslx.png Binary files differindex 62fc1320..62fc1320 100644 --- a/theming/openslx/bootsplash/themes/openslx/openslx.png +++ b/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/openslx.png diff --git a/theming/openslx/bootsplash/themes/openslx/theme.xml b/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/theme.xml index d3c9bb1b..d3c9bb1b 100644 --- a/theming/openslx/bootsplash/themes/openslx/theme.xml +++ b/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/theme.xml diff --git a/os-plugins/plugins/bootsplash/init-hooks/05-have-kernelvars/bootsplash.sh b/os-plugins/plugins/bootsplash/init-hooks/05-have-kernelvars/bootsplash.sh index 392b234e..657ae1e4 100644 --- a/os-plugins/plugins/bootsplash/init-hooks/05-have-kernelvars/bootsplash.sh +++ b/os-plugins/plugins/bootsplash/init-hooks/05-have-kernelvars/bootsplash.sh @@ -4,13 +4,13 @@ if grep -E "(VESA|VGA)" /proc/fb > /dev/null 2>&1 \ && grep -qi " quiet " /proc/cmdline > /dev/null 2>&1 \ && [ $DEBUGLEVEL -eq 0 ] \ && [ -e /bin/splashy ] ; then - export no_bootsplash=0 + export no_bootsplash=0 else export no_bootsplash=1 fi if [ ${no_bootsplash} -eq 0 ]; then - /bin/splashy boot 2>/dev/null - # add splashy.stop runlevel script - D_SPLASHY=splashy.stop + /bin/splashy boot 2>/dev/null + # add splashy.stop runlevel script + D_SPLASHY=splashy.stop fi diff --git a/os-plugins/plugins/bootsplash/init-hooks/15-have-ip-config/bootsplash.sh b/os-plugins/plugins/bootsplash/init-hooks/15-have-ip-config/bootsplash.sh index 7d8db91b..8df98b22 100644 --- a/os-plugins/plugins/bootsplash/init-hooks/15-have-ip-config/bootsplash.sh +++ b/os-plugins/plugins/bootsplash/init-hooks/15-have-ip-config/bootsplash.sh @@ -1 +1 @@ -[ ${no_bootsplash} = 0 ] && /bin/splashy_update "progress 15" >/dev/null 2>&1 +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 15" >/dev/null 2>&1 diff --git a/os-plugins/plugins/bootsplash/init-hooks/25-have-network-root/bootsplash.sh b/os-plugins/plugins/bootsplash/init-hooks/25-have-network-root/bootsplash.sh index 5d2f9a85..be6ac567 100644 --- a/os-plugins/plugins/bootsplash/init-hooks/25-have-network-root/bootsplash.sh +++ b/os-plugins/plugins/bootsplash/init-hooks/25-have-network-root/bootsplash.sh @@ -1 +1 @@ -[ ${no_bootsplash} = 0 ] && /bin/splashy_update "progress 25" >/dev/null 2>&1 +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 25" >/dev/null 2>&1 diff --git a/os-plugins/plugins/bootsplash/init-hooks/40-started-hw-config/bootsplash.sh b/os-plugins/plugins/bootsplash/init-hooks/40-started-hw-config/bootsplash.sh index 12affaa4..d5fc62ec 100644 --- a/os-plugins/plugins/bootsplash/init-hooks/40-started-hw-config/bootsplash.sh +++ b/os-plugins/plugins/bootsplash/init-hooks/40-started-hw-config/bootsplash.sh @@ -1 +1 @@ -[ ${no_bootsplash} = 0 ] && /bin/splashy_update "progress 40" >/dev/null 2>&1 +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 40" >/dev/null 2>&1 diff --git a/os-plugins/plugins/bootsplash/init-hooks/60-have-servconfig/bootsplash.sh b/os-plugins/plugins/bootsplash/init-hooks/60-have-servconfig/bootsplash.sh index 5f6a1f57..9c3bd20f 100644 --- a/os-plugins/plugins/bootsplash/init-hooks/60-have-servconfig/bootsplash.sh +++ b/os-plugins/plugins/bootsplash/init-hooks/60-have-servconfig/bootsplash.sh @@ -1 +1 @@ -[ ${no_bootsplash} = 0 ] && /bin/splashy_update "progress 60" >/dev/null 2>&1 +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 60" >/dev/null 2>&1 diff --git a/os-plugins/plugins/bootsplash/init-hooks/70-before-plugins/bootsplash.sh b/os-plugins/plugins/bootsplash/init-hooks/70-before-plugins/bootsplash.sh index d1b810f6..fcd0c410 100644 --- a/os-plugins/plugins/bootsplash/init-hooks/70-before-plugins/bootsplash.sh +++ b/os-plugins/plugins/bootsplash/init-hooks/70-before-plugins/bootsplash.sh @@ -1 +1 @@ -[ ${no_bootsplash} = 0 ] && /bin/splashy_update "progress 70" >/dev/null 2>&1 +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 70" >/dev/null 2>&1 diff --git a/os-plugins/plugins/bootsplash/init-hooks/80-after-plugins/bootsplash.sh b/os-plugins/plugins/bootsplash/init-hooks/80-after-plugins/bootsplash.sh index fa1d0baa..0abfa5b2 100644 --- a/os-plugins/plugins/bootsplash/init-hooks/80-after-plugins/bootsplash.sh +++ b/os-plugins/plugins/bootsplash/init-hooks/80-after-plugins/bootsplash.sh @@ -1 +1 @@ -[ ${no_bootsplash} = 0 ] && /bin/splashy_update "progress 80" >/dev/null 2>&1 +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 80" >/dev/null 2>&1 diff --git a/os-plugins/plugins/bootsplash/init-hooks/85-have-initial-boot/bootsplash.sh b/os-plugins/plugins/bootsplash/init-hooks/85-have-initial-boot/bootsplash.sh new file mode 100644 index 00000000..8738e454 --- /dev/null +++ b/os-plugins/plugins/bootsplash/init-hooks/85-have-initial-boot/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 85" >/dev/null 2>&1 diff --git a/os-plugins/plugins/bootsplash/init-hooks/90-postinit-done/bootsplash.sh b/os-plugins/plugins/bootsplash/init-hooks/90-postinit-done/bootsplash.sh new file mode 100644 index 00000000..2546d298 --- /dev/null +++ b/os-plugins/plugins/bootsplash/init-hooks/90-postinit-done/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 90" >/dev/null 2>&1 diff --git a/os-plugins/plugins/bootsplash/init-hooks/95-cleanup/bootsplash.sh b/os-plugins/plugins/bootsplash/init-hooks/95-cleanup/bootsplash.sh new file mode 100644 index 00000000..5ff86715 --- /dev/null +++ b/os-plugins/plugins/bootsplash/init-hooks/95-cleanup/bootsplash.sh @@ -0,0 +1 @@ +[ ${no_bootsplash} -eq 0 ] && /bin/splashy_update "progress 95" >/dev/null 2>&1 |