summaryrefslogtreecommitdiff
path: root/update-initramfs
diff options
context:
space:
mode:
Diffstat (limited to 'update-initramfs')
-rwxr-xr-xupdate-initramfs10
1 files changed, 9 insertions, 1 deletions
diff --git a/update-initramfs b/update-initramfs
index 1826233..71cc90d 100755
--- a/update-initramfs
+++ b/update-initramfs
@@ -19,6 +19,7 @@ Options:
-u Update an existing initramfs
-d Remove an existing initramfs
-t Take over a custom initramfs with this one
+ -b Set alternate boot directory
-v Be verbose
-h This message
@@ -287,7 +288,7 @@ takeover=0
##
-while getopts "k:cudyvht?" flag; do
+while getopts "k:cudyvtb:h?" flag; do
case "${flag}" in
k)
version="${OPTARG}"
@@ -310,6 +311,13 @@ while getopts "k:cudyvht?" flag; do
t)
takeover="1"
;;
+ b)
+ BOOTDIR="${OPTARG}"
+ if [ ! -d $BOOTDIR ]; then
+ echo "Error: ${BOOTDIR} is not a directory."
+ exit 1
+ fi
+ ;;
h|?)
usage
;;