only add rootflags if they are present

This commit is contained in:
Tobias Powalowski 2011-02-08 22:22:29 +01:00
parent 9930030bca
commit 1ad3099dc2

View file

@ -3084,6 +3084,7 @@ ROOTFS="$(blkid -c /dev/null ${PART_ROOT} -o value -s TYPE)"
getrootflags() {
# remove rw for all filesystems and gcpid for nilfs2
ROOTFLAGS=""
ROOTFLAGS="$(findmnt -m -n -o options -T ${DESTDIR} | sed -e 's/^rw//g' -e 's/,gcpid=.*[0-9]//g')"
[[ -n "${ROOTFLAGS}" ]] && ROOTFLAGS="rootflags=${ROOTFLAGS}"
}