diff options
author | Kurt J. Bosch <kjb-temp-2009@alpenjodel.de> | 2011-06-28 00:20:15 +0200 |
---|---|---|
committer | Kurt J. Bosch <kjb-temp-2009@alpenjodel.de> | 2011-06-28 15:39:42 +0200 |
commit | dc2e0226f91cee87b1c4157f91215caac8b6d929 (patch) | |
tree | 99ceb30b0246f978883bc0b7210f65a6c872f5bc | |
parent | ad1713018daa1905908c7e26bfa976eff3a8459f (diff) |
rc.sysinit: Refactor /etc/mtab symlink detection to avoid empty if clause
-rwxr-xr-x | rc.sysinit | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -182,12 +182,12 @@ status "Remounting Root Read/Write" \ mount -n -o remount,rw / # don't touch /etc/mtab if it is a symlink to /proc/self/mounts -if [[ -L /etc/mtab ]]; then - : -elif [[ -x $(type -P findmnt) && -e /proc/self/mountinfo ]]; then - findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS >| /etc/mtab -else - cat /proc/mounts >| /etc/mtab +if [[ ! -L /etc/mtab ]]; then + if [[ -x $(type -P findmnt) && -e /proc/self/mountinfo ]]; then + findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS >| /etc/mtab + else + cat /proc/mounts >| /etc/mtab + fi fi # now mount all the local filesystems |