diff options
-rw-r--r-- | init.d/swapfiles.in | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/init.d/swapfiles.in b/init.d/swapfiles.in index f46f3c86..baf75913 100644 --- a/init.d/swapfiles.in +++ b/init.d/swapfiles.in @@ -31,14 +31,16 @@ stop() case "$RC_UNAME" in Linux) - while read filename type rest; do - case "$type" in - file) swapoff $filename >/dev/null;; - esac - case "$filename" in - /dev/loop*) swapoff $filename >/dev/null;; - esac - done < /proc/swaps + if [ -e /proc/swaps ]; then + while read filename type rest; do + case "$type" in + file) swapoff $filename >/dev/null;; + esac + case "$filename" in + /dev/loop*) swapoff $filename >/dev/null;; + esac + done < /proc/swaps + fi ;; esac eend 0 |