diff options
author | thomas <thomas@FreeBSD.org> | 2004-08-18 21:54:40 +0000 |
---|---|---|
committer | thomas <thomas@FreeBSD.org> | 2004-08-18 21:54:40 +0000 |
commit | 78808e1a5d52d8b949cbea164c8402ffb456d24c (patch) | |
tree | 481bcd96c3eb31b8a165ecd313b50ba5b306a543 /etc/rc.d | |
parent | 90dd7ea538f3531d7a6e0f2faf41eed9b4da895d (diff) | |
download | FreeBSD-src-78808e1a5d52d8b949cbea164c8402ffb456d24c.zip FreeBSD-src-78808e1a5d52d8b949cbea164c8402ffb456d24c.tar.gz |
Skip entries for GBDE swap devices if they are commented out in /etc/fstab.
Reviewed by: des
Diffstat (limited to 'etc/rc.d')
-rw-r--r-- | etc/rc.d/encswap | 16 | ||||
-rw-r--r-- | etc/rc.d/gbde_swap | 16 |
2 files changed, 20 insertions, 12 deletions
diff --git a/etc/rc.d/encswap b/etc/rc.d/encswap index e839249..12de948 100644 --- a/etc/rc.d/encswap +++ b/etc/rc.d/encswap @@ -15,9 +15,11 @@ stop_cmd="gbde_swap_detach" gbde_swap_attach() { - cat /etc/fstab | while read device mountpoint type options rest ; do - case "${device}:${type}:${options}" in + case ":${device}:${type}:${options}" in + :#*) + continue + ;; *.bde:swap:sw) ;; *) @@ -28,14 +30,16 @@ gbde_swap_attach() device="${device%.bde}" gbde init "${device}" -P "${passphrase}" || return 1 gbde attach "${device}" -p "${passphrase}" || return 1 - done + done < /etc/fstab } gbde_swap_detach() { - cat /etc/fstab | while read device mountpoint type options rest ; do - case "${device}:${type}:${options}" in + case ":${device}:${type}:${options}" in + :#*) + continue + ;; *.bde:swap:sw) ;; *) @@ -44,7 +48,7 @@ gbde_swap_detach() esac device="${device%.bde}" gbde detach "${device}" - done + done < /etc/fstab } load_rc_config $name diff --git a/etc/rc.d/gbde_swap b/etc/rc.d/gbde_swap index e839249..12de948 100644 --- a/etc/rc.d/gbde_swap +++ b/etc/rc.d/gbde_swap @@ -15,9 +15,11 @@ stop_cmd="gbde_swap_detach" gbde_swap_attach() { - cat /etc/fstab | while read device mountpoint type options rest ; do - case "${device}:${type}:${options}" in + case ":${device}:${type}:${options}" in + :#*) + continue + ;; *.bde:swap:sw) ;; *) @@ -28,14 +30,16 @@ gbde_swap_attach() device="${device%.bde}" gbde init "${device}" -P "${passphrase}" || return 1 gbde attach "${device}" -p "${passphrase}" || return 1 - done + done < /etc/fstab } gbde_swap_detach() { - cat /etc/fstab | while read device mountpoint type options rest ; do - case "${device}:${type}:${options}" in + case ":${device}:${type}:${options}" in + :#*) + continue + ;; *.bde:swap:sw) ;; *) @@ -44,7 +48,7 @@ gbde_swap_detach() esac device="${device%.bde}" gbde detach "${device}" - done + done < /etc/fstab } load_rc_config $name |