Skip to content

Instantly share code, notes, and snippets.

@digilord
Created December 20, 2013 23:14
Show Gist options
  • Save digilord/8063146 to your computer and use it in GitHub Desktop.
Save digilord/8063146 to your computer and use it in GitHub Desktop.
# Do we have swap?
grep swap /etc/fstab -q
status=$?
if [ $status -ne 0 ]; then
dd if=/dev/zero of=/swapfile bs=1024 count=1048576
echo "/swapfile none swap sw 0 0" >> /etc/fstab
swapon /swapfile
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment