genfstab: canonicalize root dir
Avoids problems with users passing weird inputs (such as including a trailing slash). ref: https://bugs.archlinux.org/task/45753
This commit is contained in:
parent
585b1f790f
commit
daa2fac5b2
@ -119,7 +119,7 @@ done
|
||||
shift $(( OPTIND - 1 ))
|
||||
|
||||
(( $# )) || die "No root directory specified"
|
||||
root=$1; shift
|
||||
root=$(realpath -mL "$1"); shift
|
||||
|
||||
if ! mountpoint -q "$root"; then
|
||||
die "$root is not a mountpoint"
|
||||
|
Loading…
Reference in New Issue
Block a user