cleaner implementation
[feisty_meow.git] / scripts / system / add_swap_mount.sh
1 #!/bin/bash
2
3 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
4
5 #hmmm: should be able to add a new swap drive if desired.
6
7 #hmmm: why all the hard-coded paths below?
8
9 /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
10 check_result "creating swap file"
11
12 /bin/chmod 600 /var/swap.1
13 check_result "setting swap file permissions"
14
15 /sbin/mkswap /var/swap.1
16 check_result "formatting swap file as swap partition"
17
18 /sbin/swapon /var/swap.1
19 check_result "enabling new swap partition"
20
21 free
22