projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'release-2.140.125'
[feisty_meow.git]
/
scripts
/
system
/
add_swap_mount.sh
diff --git
a/scripts/system/add_swap_mount.sh
b/scripts/system/add_swap_mount.sh
index b400fcb98f556d52faf28ab2794f439800745dad..dc14f84e31ac97bc4ed80c65677cf68e86003392 100644
(file)
--- a/
scripts/system/add_swap_mount.sh
+++ b/
scripts/system/add_swap_mount.sh
@@
-39,16
+39,16
@@
if [ -z "$SWAP_SIZE" ]; then
fi
/bin/dd if=/dev/zero of=/var/swap.${SWAP_INSTANCE} bs=1M count=${SWAP_SIZE}
fi
/bin/dd if=/dev/zero of=/var/swap.${SWAP_INSTANCE} bs=1M count=${SWAP_SIZE}
-
test_or_die
"creating swap file"
+
exit_on_error
"creating swap file"
/bin/chmod 600 /var/swap.${SWAP_INSTANCE}
/bin/chmod 600 /var/swap.${SWAP_INSTANCE}
-
test_or_die
"setting swap file permissions"
+
exit_on_error
"setting swap file permissions"
/sbin/mkswap /var/swap.${SWAP_INSTANCE}
/sbin/mkswap /var/swap.${SWAP_INSTANCE}
-
test_or_die
"formatting swap file as swap partition"
+
exit_on_error
"formatting swap file as swap partition"
/sbin/swapon /var/swap.${SWAP_INSTANCE}
/sbin/swapon /var/swap.${SWAP_INSTANCE}
-
test_or_die
"enabling new swap partition"
+
exit_on_error
"enabling new swap partition"
free
free