summaryrefslogtreecommitdiff
path: root/scripts/live-bottom/13swap
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 14:46:37 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:25:54 +0100
commit3d52fbcb4fe70132ade14759d76573b471294800 (patch)
tree7ee8e69a62e032cb427e6b3ae96481ae4e8c9df8 /scripts/live-bottom/13swap
parent9fc9e2a1a11b0edada38cb501fefe4f58aa414ac (diff)
downloadlive-boot-3d52fbcb4fe70132ade14759d76573b471294800.tar.gz
live-boot-3d52fbcb4fe70132ade14759d76573b471294800.zip
Adding live-initramfs 1.87.3-1.
Diffstat (limited to 'scripts/live-bottom/13swap')
-rwxr-xr-xscripts/live-bottom/13swap7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/live-bottom/13swap b/scripts/live-bottom/13swap
index fcef76c..9d762f4 100755
--- a/scripts/live-bottom/13swap
+++ b/scripts/live-bottom/13swap
@@ -21,6 +21,11 @@ esac
log_begin_msg "$DESCRIPTION"
+if [ -n "${SWAPOFF}" ]
+then
+ exit 0
+fi
+
devices=""
for device in /dev/[hs]d[a-z][0-9]*; do
if ! [ -b "$device" ]; then
@@ -28,7 +33,7 @@ for device in /dev/[hs]d[a-z][0-9]*; do
fi
magic=$(/bin/dd if="$device" bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null) || continue
-
+
if [ "$magic" = "SWAPSPACE2" -o "$magic" = "SWAP-SPACE" ]; then
# log "Found $device"
devices="$devices $device"