From befe2e8f2a9ca3144bccebbf4bf4c930d8dc27c1 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Wed, 25 Oct 2017 15:00:15 +0800 Subject: make_dev_ssd: Include full command path in error/help message Let's use the actual command/path used to call make_dev_ssd.sh, instead of hard-coding './'. BRANCH=none BUG=none TEST=/usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification outputs a command that can just be copy-pasted: sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification --partitions 4 (instead of: sudo ./make_dev_ssd.sh --remove_rootfs_verification --partitions 4 ) Change-Id: I903f94acc1fb310926b149c1e79e4017bf513e27 Reviewed-on: https://chromium-review.googlesource.com/737810 Commit-Ready: Nicolas Boichat Tested-by: Nicolas Boichat Reviewed-by: Hung-Te Lin --- scripts/image_signing/make_dev_ssd.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/image_signing/make_dev_ssd.sh b/scripts/image_signing/make_dev_ssd.sh index dad0e5b0..574dd574 100755 --- a/scripts/image_signing/make_dev_ssd.sh +++ b/scripts/image_signing/make_dev_ssd.sh @@ -45,6 +45,7 @@ DEFINE_boolean force "$FLAGS_FALSE" "Skip sanity checks and make the change" "f" # Parse command line FLAGS "$@" || exit 1 +ORIGINAL_CMD="$0" ORIGINAL_PARAMS="$@" eval set -- "$FLAGS_ARGV" ORIGINAL_PARTITIONS="$FLAGS_partitions" @@ -370,7 +371,7 @@ sanity_check_live_partitions() { change the partition you have booted with. To do that, re-execute this command as: - sudo ./make_dev_ssd.sh $ORIGINAL_PARAMS --partitions $ROOTDEV_KERNEL + sudo $ORIGINAL_CMD $ORIGINAL_PARAMS --partitions $ROOTDEV_KERNEL If you are sure to modify other partition, please invoke the command again and explicitly assign only one target partition for each time (--partitions N ) @@ -419,13 +420,13 @@ sanity_check_live_firmware() { - To change system rootkey: disable firmware write protection (a hardware switch) and then type command: - sudo ./make_dev_firmware.sh + sudo $SCRIPT_BASE/make_dev_firmware.sh If you are sure that you want to make such image without developer firmware or you've already changed system root keys, please run this command again with --force paramemeter: - sudo ./make_dev_ssd.sh --force $ORIGINAL_PARAMS + sudo $ORIGINAL_CMD --force $ORIGINAL_PARAMS " return $FLAGS_FALSE } -- cgit v1.2.1