diff options
author | 2015-04-06 13:34:23 +0000 | |
---|---|---|
committer | 2015-04-06 13:34:23 +0000 | |
commit | fab2054f8c77c567acd766b75550a0eed52c55f7 (patch) | |
tree | 6b65c7ad009b8ec8cc99d55d95a92bbdc625c49b | |
parent | move some inline linux compat into the dedicated files (diff) | |
download | wireguard-openbsd-fab2054f8c77c567acd766b75550a0eed52c55f7.tar.xz wireguard-openbsd-fab2054f8c77c567acd766b75550a0eed52c55f7.zip |
Use if then else instead of testing $_fstype twice.
OK krw@
-rw-r--r-- | distrib/miniroot/install.sub | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 8c4cdf5252e..7dc230b0904 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.829 2015/04/05 12:37:14 rpe Exp $ +# $OpenBSD: install.sub,v 1.830 2015/04/06 13:34:23 rpe Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org> @@ -1877,12 +1877,12 @@ munge_fstab() { # Change read-only ffs to read-write since we'll potentially # write to these filesystems. - [[ $_fstype == ffs ]] && - _opt=$(echo $_opt | sed 's/[[:<:]]ro[[:>:]]/rw/') - # Mount non-ffs filesystems read only. - [[ $_fstype == ffs ]] || + if [[ $_fstype == ffs ]]; then + _opt=$(echo $_opt | sed 's/[[:<:]]ro[[:>:]]/rw/') + else _opt=$(echo $_opt | sed 's/[[:<:]]rw[[:>:]]/ro/') + fi # Write fs entry in fstab. # 1) prepend '/mnt' to the mount point. |