Call --reset when giving default plugin if needed

Previously, we tried to do this but failed because
of a buggy conditional.
This commit is contained in:
Ray Strode 2008-11-21 11:49:53 -05:00
parent 9435d6cc22
commit 711636ec6a

View file

@ -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