]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Call --reset when giving default plugin if needed
authorRay Strode <rstrode@redhat.com>
Fri, 21 Nov 2008 16:49:53 +0000 (11:49 -0500)
committerRay Strode <rstrode@redhat.com>
Fri, 21 Nov 2008 16:49:53 +0000 (11:49 -0500)
Previously, we tried to do this but failed because
of a buggy conditional.

scripts/plymouth-set-default-plugin.in

index 427803bb89db04bec7fc955fbd9197e6b3f36972..2d4728ab5ae1a20319bf03d485784867d596b445 100755 (executable)
@@ -34,11 +34,11 @@ function list_plugins ()
 function get_default_plugin ()
 {
         PLUGIN_NAME=$(basename $(readlink ${LIBDIR}/plymouth/default.so) .so)
-        if [ -z "$PLUGIN_NAME" ]; then
+        if [ "$PLUGIN_NAME" = ".so" ]; then
                 $0 --reset
                 PLUGIN_NAME=$(basename $(readlink ${LIBDIR}/plymouth/default.so) .so)
         fi
-        [ -n "$PLUGIN_NAME" ] && echo $PLUGIN_NAME || exit 1
+        [ "$PLUGIN_NAME" = ".so" ] || echo $PLUGIN_NAME && exit 1
 }
 
 DO_RESET=0