mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-07 04:58:00 +02:00
Add usage info to plymouth-set-default-plugin
This commit is contained in:
parent
6222e35e08
commit
02ea84e6d3
1 changed files with 10 additions and 0 deletions
|
|
@ -14,6 +14,11 @@ fi
|
|||
[ -z "$LIBDIR" ] && LIBDIR="/usr/$LIB"
|
||||
[ -z "$BINDIR" ] && BINDIR="/usr/bin"
|
||||
|
||||
function usage ()
|
||||
{
|
||||
echo "usage: plymouth-set-default-plugin { --reset | <plugin-name> }"
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
PLUGIN_NAME=$(basename $(readlink ${LIBDIR}/plymouth/default.so) .so)
|
||||
if [ -z "$PLUGIN_NAME" ]; then
|
||||
|
|
@ -29,6 +34,11 @@ if [ `id -u` -ne 0 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo $(usage) > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PLUGIN_NAME=$1
|
||||
if [ $1 = '--reset' ]; then
|
||||
PLUGIN_NAME=$(basename $(ls -1 -t ${LIBDIR}/plymouth/*.so 2> /dev/null | grep -v default.so | tail -n 1) .so)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue