On Fri, 2019-12-06 at 15:45 +0100, Ulrich Mueller wrote: > > > + local fstabstate=$(awk '!/^[[:blank:]]*#|^\/dev\/BOOT/ && $2 == "/boot" \ > > > + {print $2}' /etc/fstab) > > The 'print' here is used as a boolean... why not use a boolean output > > instead? > > Changed, it's printing a 1 now. Well, I actually meant using exit status ;-). Would be also have the benefit of terminating early. > > > > + local procstate=$(awk '$2 == "/boot" \ > > > + {print gensub(/^(.*,)?(ro|rw)(,.*)?$/, "\\2", 1, $4)}' /proc/mounts) > > Shouldn't this use /proc/self/mounts? > > I haven't actually changed this, it was /proc/mounts before (which is a > symlink to self/mounts). Maybe we should keep it as-is for backwards > compatibility? (But TBH, I have no idea with which kernel version > /proc/self/mounts appeared.) Ok. > > > > + mount-boot_check_status > > > + if ! ( shopt -s failglob; : "${ROOT}"/boot/.keep* ) 2>/dev/null ; then > > EROOT? > > Hm, we mount /boot, not ${EROOT}/boot. I've added an additional test for > [[ ${EROOT:-/} == / ]] before touching the file. > > Patch v2 will follow. > Thanks. -- Best regards, Michał Górny