From: Daniel Baumann Date: Fri, 27 Mar 2009 10:32:22 +0000 (+0100) Subject: Correcting swap partition handling in fstab to not always append entries forever... X-Git-Tag: debian/1.157.2-1~7 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;ds=sidebyside;h=88305bfa98d22e09a7d4bba8bbe70c32dd577a77;p=live-boot-grml.git Correcting swap partition handling in fstab to not always append entries forever when using persistency. --- diff --git a/scripts/live-bottom/13swap b/scripts/live-bottom/13swap index 8fc718c..448c90a 100755 --- a/scripts/live-bottom/13swap +++ b/scripts/live-bottom/13swap @@ -55,9 +55,10 @@ done for device in ${devices} do -cat >> ${FSTAB} << EOF -${device} swap swap defaults 0 0 -EOF +if ! grep -qs "^${device} swap" "${FSTAB}" +then + echo "${device} swap swap defaults 0 0" >> "${FSTAB}" +fi done