summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authorthomas <thomas@FreeBSD.org>2004-08-18 21:54:40 +0000
committerthomas <thomas@FreeBSD.org>2004-08-18 21:54:40 +0000
commit78808e1a5d52d8b949cbea164c8402ffb456d24c (patch)
tree481bcd96c3eb31b8a165ecd313b50ba5b306a543 /etc/rc.d
parent90dd7ea538f3531d7a6e0f2faf41eed9b4da895d (diff)
downloadFreeBSD-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/encswap16
-rw-r--r--etc/rc.d/gbde_swap16
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
OpenPOWER on IntegriCloud