From 2f89dc90609dcbe9f500c41ea2bbfc83a7e4922e Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 25 Dec 2023 11:07:47 -0500 Subject: [PATCH] plymouth-populate-initrd: Fix usage message It currently says the scripts name is `plymouth` not `plymouth-populate-initrd`. This commit changes it to use $0 --- scripts/plymouth-populate-initrd.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/plymouth-populate-initrd.in b/scripts/plymouth-populate-initrd.in index 1c29e4c7..8ccac22c 100755 --- a/scripts/plymouth-populate-initrd.in +++ b/scripts/plymouth-populate-initrd.in @@ -397,61 +397,61 @@ function read_setting_from_file() # $1: Configuration file function set_configured_theme_path_from_file() { CONFIGURED_THEME_DIR=$(read_setting_from_file "$1" "ThemeDir") CONFIGURED_THEME_NAME=$(read_setting_from_file "$1" "Theme") } function set_theme_dir() { set_configured_theme_path_from_file ${PLYMOUTH_CONFDIR}/plymouthd.conf if [ -z "$CONFIGURED_THEME_DIR" ] || [ ! -d "$CONFIGURED_THEME_DIR/$CONFIGURED_THEME_NAME" ]; then set_configured_theme_path_from_file ${PLYMOUTH_POLICYDIR}/plymouthd.defaults fi if [ -n "$CONFIGURED_THEME_DIR" ] && [ -d "$CONFIGURED_THEME_DIR/$CONFIGURED_THEME_NAME" ]; then PLYMOUTH_THEME_NAME=$CONFIGURED_THEME_NAME PLYMOUTH_THEME_DIR=$CONFIGURED_THEME_DIR/$CONFIGURED_THEME_NAME else PLYMOUTH_THEME_DIR=$PLYMOUTH_DATADIR/plymouth/themes/$PLYMOUTH_THEME_NAME fi } function usage() { local output="/proc/self/fd/1" local rc=0 if [ "$1" == "error" ]; then output="/proc/self/fd/2" rc=1 fi - echo "usage: plymouth [ --verbose | -v ] { --targetdir | -t } { --x11-directory | -x } " > $output + echo "usage: $0 [ --verbose | -v ] { --targetdir | -t } { --x11-directory | -x } " > $output exit $rc } verbose=false INITRDDIR="" X11_DIRECTORY="/usr/share/X11" while [ $# -gt 0 ]; do case $1 in --verbose|-v) verbose=true ;; --targetdir|-t) shift INITRDDIR="$1" ;; --help|-h) usage normal ;; --x11-directory|-x) shift X11_DIRECTORY="$1" ;; *) usage error break ;; esac shift done -- 2.43.0