From 226ab5b3d5f722307af9164eb6cc9bbf23790645 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sat, 14 Apr 2012 14:56:00 +0000 Subject: Do not pass theme in when calling make-boot-splash-raw. This reverts and earlier commit that used it explicitly, however this approach is more error prone. The default theme is set in make-boot-splash, and thus it will be used when calling via this route. Error checking is done at this higher level and thus if an invalid theme is passed in the old theme will still be default and we will properly regenerate initrd. Clarify that the theme argument should not be passed in the help output. --- scripts/make-boot-splash | 2 +- scripts/make-boot-splash-raw | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/make-boot-splash b/scripts/make-boot-splash index f4d5dab..cca72f2 100755 --- a/scripts/make-boot-splash +++ b/scripts/make-boot-splash @@ -17,7 +17,7 @@ resolution=$2 plymouth-set-default-theme $THEME -$splash_dir/scripts/make-boot-splash-raw $initrd_file $THEME || exit 1 +$splash_dir/scripts/make-boot-splash-raw $initrd_file || exit 1 if [ -z "$DURING_INSTALL" ]; then $splash_dir/scripts/switch-themes -u diff --git a/scripts/make-boot-splash-raw b/scripts/make-boot-splash-raw index 4eca50f..74a65eb 100755 --- a/scripts/make-boot-splash-raw +++ b/scripts/make-boot-splash-raw @@ -7,10 +7,9 @@ : ${splash_dir=/usr/share/bootsplash} -[ $# = 2 ] || { echo "usage: $0 "; exit 1; } +[ $# = 1 -o $# = 2 ] || { echo "usage: $0 "; exit 1; } initrd_file=$1 -THEME=$2 tmp_dir= tmp_initrd= @@ -54,7 +53,7 @@ if [ -n "$CPIO" ]; then # If the theme has changed, we should remove the old one first to save space rm -rf $tmp_dir/plymouth/usr/share/plymouth/themes - PLYMOUTH_THEME_NAME=$THEME /usr/libexec/plymouth/plymouth-populate-initrd -t . || clean_and_fail + /usr/libexec/plymouth/plymouth-populate-initrd -t . || clean_and_fail find . | \ cpio -R 0:0 -H newc -o --quiet | \ @@ -71,7 +70,7 @@ else gzip -dc $initrd_file > $tmp_initrd 2> /dev/null || clean_and_fail mount -o loop $tmp_initrd $tmp_dir 2> /dev/null || clean_and_fail rm -rf $tmp_dir/usr/share/plymouth $tmp_dir/usr/lib*/plymouth - PLYMOUTH_THEME_NAME=$THEME /usr/libexec/plymouth/plymouth-populate-initrd -t $tmp_dir + /usr/libexec/plymouth/plymouth-populate-initrd -t $tmp_dir rc=$? umount $tmp_dir 2>/dev/null [ $rc -ne 0 ] && clean_and_fail -- cgit v1.2.1