swap creation and removal
This commit is contained in:
parent
ebb89b3cef
commit
d9912aeabb
17
files/etc/rc.local
Executable file
17
files/etc/rc.local
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
#
|
||||||
|
# rc.local
|
||||||
|
#
|
||||||
|
# This script is executed at the end of each multiuser runlevel.
|
||||||
|
# Make sure that the script will "exit 0" on success or any other
|
||||||
|
# value on error.
|
||||||
|
#
|
||||||
|
# In order to enable or disable this script just change the execution
|
||||||
|
# bits.
|
||||||
|
#
|
||||||
|
# By default this script does nothing.
|
||||||
|
|
||||||
|
dd if=/dev/zero of=/home/vagrant/swap.img bs=1M count=2048
|
||||||
|
mkswap /home/vagrant/swap.img
|
||||||
|
swapon /home/vagrant/swap.img
|
||||||
|
exit 0
|
4
files/etc/rc6.d/K99remove-swap
Executable file
4
files/etc/rc6.d/K99remove-swap
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
swapoff -a
|
||||||
|
rm -rf /home/vagrant/swap.img
|
@ -31,5 +31,6 @@ sudo apt-get clean
|
|||||||
# Enable shared folder access
|
# Enable shared folder access
|
||||||
sudo adduser vagrant vboxsf
|
sudo adduser vagrant vboxsf
|
||||||
|
|
||||||
# Enable autologin
|
# Copy global configs (/etc)
|
||||||
|
# (autologin, swap creation and deletion, etc.)
|
||||||
sudo cp -ar /vagrant/files/etc /
|
sudo cp -ar /vagrant/files/etc /
|
||||||
|
Loading…
Reference in New Issue
Block a user