diff options
Diffstat (limited to 'os-plugins/plugins')
18 files changed, 199 insertions, 32 deletions
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/os-plugins/plugins/bootsplash/files/bin/splashy b/os-plugins/plugins/bootsplash/files/bin/splashy Binary files differnew file mode 100755 index 00000000..ad5b0ad2 --- /dev/null +++ b/os-plugins/plugins/bootsplash/files/bin/splashy diff --git a/os-plugins/plugins/bootsplash/files/bin/splashy_update b/os-plugins/plugins/bootsplash/files/bin/splashy_update Binary files differnew file mode 100755 index 00000000..0a7be6c8 --- /dev/null +++ b/os-plugins/plugins/bootsplash/files/bin/splashy_update diff --git a/os-plugins/plugins/bootsplash/files/themes/openslx/config.xml b/os-plugins/plugins/bootsplash/files/themes/openslx/config.xml new file mode 100644 index 00000000..16080a07 --- /dev/null +++ b/os-plugins/plugins/bootsplash/files/themes/openslx/config.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Automatically generated by splashy_config. Do not edit --> +<splashy> + <!-- themes directory: conventional path /etc/splashy/themes --> + <themes>/etc/splashy/themes</themes> + <!-- current theme could be relative the themes defined above or full path --> + <current_theme>openslx</current_theme> + <!-- full path to theme to fall back in case of problems. DO NOT CHANGE --> + <default_theme>/etc/splashy/themes/openslx</default_theme> + <pid>/etc/splashy/splashy.pid</pid> + <fifo>/dev/.initramfs/splashy.fifo</fifo> +</splashy> diff --git a/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/blank.ttf b/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/blank.ttf new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/blank.ttf diff --git a/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/openslx.png b/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/openslx.png Binary files differnew file mode 100644 index 00000000..62fc1320 --- /dev/null +++ b/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/openslx.png diff --git a/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/theme.xml b/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/theme.xml new file mode 100644 index 00000000..d3c9bb1b --- /dev/null +++ b/os-plugins/plugins/bootsplash/files/themes/openslx/themes/openslx/theme.xml @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Automatically generated by splashy_config. Do not edit --> +<splashy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://splashy.alioth.debian.org/schemas/1.1/themes.xsd"> + <info> + <!-- theme name is case sensitive. use directory name --> + <name>openslx</name> + <version>0.1</version> + <description>...</description> + <urls>http://</urls> + <author>Author <author@mail.com></author> + </info> + <progressbar> + <!-- here are tags to set the bar... x coordinate, + y coordinate, width and height are for the progress bar. + Remember that x, y, width and height are expressed in percentage --> + <dimension> + <x>0</x> + <y>42</y> + <width>100</width> + <height>17</height> + </dimension> + <!-- here you can set the color of the progressbar... + set the amount of red, green, blue and alpha channel. + Remember that the max value is 255 and the minumun value is 0--> + <color> + <red>128</red> + <green>147</green> + <blue>161</blue> + <alpha>255</alpha> + </color> + <!-- whether or not you want a border around the progressbar. default: no --> + <border> + <enable>no</enable> + <color> + <red>0</red> + <green>0</green> + <blue>0</blue> + <alpha>0</alpha> + </color> + </border> + <!-- here you can set the color of the progressbar background + set the amount of red, green, blue and alpha channel. + Remember that the max value is 255 and the minumun value is 0--> + <background> + <color> + <red>240</red> + <green>240</green> + <blue>240</blue> + <alpha>255</alpha> + </color> + </background> + <direction> + <boot>forward</boot> + <shutdown>backward</shutdown> + <resume>forward</resume> + <suspend>backward</suspend> + </direction> + <visibility> + <boot>yes</boot> + <shutdown>yes</shutdown> + <resume>yes</resume> + <suspend>yes</suspend> + </visibility> + </progressbar> + <!-- conventional path: /etc/splashy/themes + theme-name --> + <background> + <boot>openslx.png</boot> + <shutdown>openslx.png</shutdown> + <resume>openslx.png</resume> + <suspend>openslx.png</suspend> + <errorimg>openslx.png</errorimg> + <!-- resolution of the images. this value affects where + the progressbar will be drawn. If VALUE <= 0, then percentages + of the screen width and hight will be assumed --> + <dimension> + <!-- NOTE: x and y are not used by splashy --> + <x>0</x> + <y>0</y> + <width>0</width> + <height>0</height> + </dimension> + </background> + <textbox> + <!-- whether you want the textbox always + shown or no. If no, it will be shown only on error, + see autoverboseonerror --> + <enable>no</enable> + <!-- here are tags to set the text area... x coordinate, + y coordinate, width and height are for the text area. + Remember that x, y, width and height are expressed in percentage + or pixel units --> + <dimension> + <x>1</x> + <y>61</y> + <width>98</width> + <height>38</height> + </dimension> + <!-- here you can set the color of the text area... + set the amount of red, green, blue and alpha channel. + Remember that the max value is 255 and the minumun value is 0--> + <color> + <red>0</red> + <green>0</green> + <blue>0</blue> + <alpha>0</alpha> + </color> + <!-- whether or not you want a border around the progressbar. default: no --> + <border> + <enable>no</enable> + <color> + <red>0</red> + <green>0</green> + <blue>0</blue> + <alpha>0</alpha> + </color> + </border> + <text> + <!-- font file to use, path relative to theme --> + <font> + <file>blank.ttf</file> + <height>2</height> + </font> + <!-- here you can set the color of the text/font... + set the amount of red, green, blue and alpha channel. + Remember that the max value is 255 and the minumun value is 0--> + <color> + <red>62</red> + <green>93</green> + <blue>114</blue> + <alpha>0</alpha> + </color> + </text> + </textbox> + <autoverboseonerror>no</autoverboseonerror> + <fadein>no</fadein> + <fadeout>no</fadeout> +</splashy> 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 |