Commit 1e4ecdc6 authored by Tails developers's avatar Tails developers
Browse files

Use dpkg-divert for more robust swapon replacement.

parent ad8d3695
#!/bin/sh #!/bin/sh
# Disable swapon to avoid initscripts to setup swap space.
# Rationale: security-in-depth model.
set -e
SWAPON=/sbin/swapon SWAPON=/sbin/swapon
rm --force $SWAPON # Move any /sbin/swapon installed by any package out of the way,
# now (--rename) as well for any future one (hint: apt-get upgrade...).
dpkg-divert --rename --add /sbin/swapon
# Install a custom noop swapon executable instead.
cat > $SWAPON << 'EOF' cat > $SWAPON << 'EOF'
#!/bin/sh #!/bin/sh
/bin/true /bin/true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment