diff options
author | Turbo Fredriksson <[email protected]> | 2015-06-19 16:21:30 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-06-25 11:56:09 -0700 |
commit | 216f9d04a651a6b692de9933cc37ee238267a617 (patch) | |
tree | 6e57e456ff1b0f26dd949b5cfad2f8bd0273c5a6 /etc/init.d/zfs-functions.in | |
parent | c52fca13a08f6a5c1f14a44d6f3707a48a27a1d0 (diff) |
Revert "Additional SYSV init script fixes."
This reverts commit 036391c980c1e6504352b770eb385806a951b1cb.
Because #3509 came just after this commit was accepted and is related
to the original problem the commit was supposed to fix, we need to
solve the problem in another way.
Signed-off-by: Turbo Fredriksson <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'etc/init.d/zfs-functions.in')
-rw-r--r-- | etc/init.d/zfs-functions.in | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/etc/init.d/zfs-functions.in b/etc/init.d/zfs-functions.in index 24c0bdbd1..372bae803 100644 --- a/etc/init.d/zfs-functions.in +++ b/etc/init.d/zfs-functions.in @@ -371,16 +371,13 @@ read_mtab() # Unset all MTAB_* variables unset $(env | grep ^MTAB_ | sed 's,=.*,,') - mount | \ - grep -E "$match" | \ - sed "s,\(.*\) on \(.*\) type .*,\1;\2," | \ - while read line; do - mntpnt=$(echo "$line" | sed -e 's,;.*,,' -e 's,/,_,g' \ - -e 's,-,_,g' -e 's,\.,_,g' -e 's, ,_,g') - fs=$(echo "$line" | sed 's,.*;,,') - - eval export MTAB_$mntpnt="'$fs'" - done + while read -r fs mntpnt fstype opts rest; do + if echo "$fs $mntpnt $fstype $opts" | grep -qE "$match"; then + mntpnt=$(printf '%b\n' "$mntpnt" | sed -e 's,/,_,g' \ + -e 's,-,_,g' -e 's,\.,_,g') + eval export MTAB_$mntpnt="$fs" + fi + done < /proc/mounts } in_mtab() |