File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ usage: ${0##*/} [options]
2020
2121 Options:
2222 -r root Install to 'root' (default: /mnt)
23+ -d Allow installation to a non-mountpoint directory
2324
2425EOF
2526}
@@ -29,8 +30,11 @@ if [[ -z $1 || $1 = @(-h|--help) ]]; then
2930 exit $(( $# ? 0 : 1 ))
3031fi
3132
32- while getopts ' :r :' flag; do
33+ while getopts ' :dr :' flag; do
3334 case $flag in
35+ d)
36+ directory=1
37+ ;;
3438 r)
3539 newroot=$OPTARG
3640 ;;
4751 packages=(' base' ' base-devel' )
4852fi
4953
50- rootdev=$( findmnt -runo SOURCE " $newroot " ) || die ' %s is not a mountpoint!' " $newroot "
54+ [[ -d $newroot ]] || die " %s is not a directory" " $newroot "
55+ if ! mountpoint -q " $newroot " && (( ! directory )) ; then
56+ die ' %s is not a mountpoint!' " $newroot "
57+ fi
5158
5259# create obligatory directories
5360msg ' Creating install root at %s' " $newroot "
You can’t perform that action at this time.
0 commit comments