Merge branch 'bugfix/git-https' into experimental
[tails-test.git] / config / chroot_local-hooks / 05-disable_swapon
blob26386afaf0770b9585faf906639a02c5a6ba4d65
1 #!/bin/sh
3 set -e
5 # Disable swapon to avoid initscripts to setup swap space.
6 # Rationale: security-in-depth model.
8 SWAPON=/sbin/swapon
10 # Move any /sbin/swapon installed by any package out of the way,
11 # now (--rename) as well for any future one (hint: apt-get upgrade...).
12 dpkg-divert --rename --add /sbin/swapon
14 # Install a custom noop swapon executable instead.
15 cat > $SWAPON << 'EOF'
16 #!/bin/sh
17 /bin/true
18 EOF
19 chmod 755 $SWAPON