projects
/
live-boot-grml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Applying patch from Michael Prokop <mika@grml.org> to support udev >= 0.140.
[live-boot-grml.git]
/
scripts
/
live-bottom
/
13swap
diff --git
a/scripts/live-bottom/13swap
b/scripts/live-bottom/13swap
index
8fc718c
..
448c90a
100755
(executable)
--- 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