Commit 6c2d576c authored by Natanael Copa's avatar Natanael Copa

setup-disk: added usage text

parent fc19274f
......@@ -368,17 +368,34 @@ EOF
install_mounted_root /mnt
}
usage() {
cat <<__EOF__
usage: setup-disk [-hr] [-k kernelflavor] [-o apkovl] [MOUNTPOINT]
Install alpine on harddisk.
options:
-h Show this help
-o Restore system from given apkovl file
-k Use kernelflavor instead of $KERNEL_FLAVOR
-r Enable software raid1 with single disk
__EOF__
exit 1
}
KERNEL_FLAVOR=grsec
case "$(uname -r)" in
*-vs[0-9]*) KERNEL_FLAVOR=vserver;;
esac
# Parse args
while getopts "k:o:r" opt; do
while getopts "hk:o:r" opt; do
case $opt in
k) KERNEL_FLAVOR="$OPTARG";;
r) USE_RAID=1;;
o) APKOVL="$OPTARG";;
*) usage;;
esac
done
shift $(( OPTIND - 1))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment