[PATCH openbmc 10/16] initfs: update: add --help message
OpenBMC Patches
openbmc-patches at stwcx.xyz
Fri Jul 1 09:50:27 AEST 2016
From: Milton Miller <miltonm at us.ibm.com>
Now that update is intended for use at runtime and not just by
the init and shutdown scripts, add a short help message listing
the options so people don't have to understand how to read shell.
Signed-off-by: Milton Miller <miltonm at us.ibm.com>
---
.../obmc-phosphor-initfs/files/obmc-update.sh | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
index fa46635..268c6ad 100755
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
@@ -106,6 +106,24 @@ image=/run/initramfs/image-
while test "$1" != "${1#-}"
do
case "$1" in
+ --help)
+ cat <<HERE
+Usage: $0 [options] -- Write images in /run/initramfs to flash (/dev/mtd*)
+ --help Show this message
+ --no-flash Don't attempt to write images to flash
+ --ignore-size Don't compare image size to mtd device size
+ --ignore-mount Don't check if destination is mounted
+ --save-files Copy whitelisted files to save directory in RAM
+ --no-save-files Don't copy whitelisted files to save directory
+ --copy-files Copy files from save directory to rwfs mountpoint
+ --restore-files Restore files from save directory to rwfs layer
+ --no-restore-files Don't restore saved files from ram to rwfs layer
+ --clean-saved-files Delete saved whitelisted files from RAM
+ --no-clean-saved-files Retain saved whitelisted files in RAM
+HERE
+
+ exit 0 ;;
+
--no-clean-saved-files)
doclean=
shift ;;
@@ -138,7 +156,7 @@ do
toram=y
shift ;;
*)
- echoerr "Unknown option $1"
+ echoerr "Unknown option $1. Try $0 --help."
exit 1 ;;
esac
done
--
2.9.0
More information about the openbmc
mailing list