diff options
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | systemd/fedora-autoswap (renamed from systemd/fedora-swapon) | 4 | ||||
-rw-r--r-- | systemd/system/fedora-autoswap.service (renamed from systemd/system/fedora-swapon.service) | 4 |
3 files changed, 4 insertions, 6 deletions
@@ -127,7 +127,7 @@ install: mkdir -p -m 755 $(ROOT)/lib/systemd/system/sysinit.target.wants ln -s ../fedora-configure.service $(ROOT)/lib/systemd/system/basic.target.wants ln -s ../fedora-loadmodules.service $(ROOT)/lib/systemd/system/basic.target.wants - ln -s ../fedora-swapon.service $(ROOT)/lib/systemd/system/basic.target.wants + ln -s ../fedora-autoswap.service $(ROOT)/lib/systemd/system/basic.target.wants ln -s ../fedora-sysinit-hack.service $(ROOT)/lib/systemd/system/basic.target.wants ln -s ../fedora-cleanup.service $(ROOT)/lib/systemd/system/local-fs.target.wants ln -s ../fedora-mountall.service $(ROOT)/lib/systemd/system/local-fs.target.wants diff --git a/systemd/fedora-swapon b/systemd/fedora-autoswap index 98c5b273..ea392909 100755 --- a/systemd/fedora-swapon +++ b/systemd/fedora-autoswap @@ -1,12 +1,10 @@ #!/bin/bash # -# Start up swap (partitions and files) +# Support automatic swapon. # . /etc/init.d/functions -update_boot_stage RCswap -action $"Enabling /etc/fstab swaps: " swapon -a -e if [ "$AUTOSWAP" = "yes" ]; then curswap=$(awk '/^\/dev/ { print $1 }' /proc/swaps | while read x; do get_numeric_dev dec $x ; echo -n " "; done) swappartitions=$(blkid -t TYPE=swap -o device) diff --git a/systemd/system/fedora-swapon.service b/systemd/system/fedora-autoswap.service index 4b945026..c5087967 100644 --- a/systemd/system/fedora-swapon.service +++ b/systemd/system/fedora-autoswap.service @@ -1,5 +1,5 @@ [Unit] -Description=Configure the system if the administrator requested it +Description=Enable all detected swap partitions DefaultDependencies=no Conflicts=shutdown.target Before=shutdown.target emergency.service emergency.target @@ -7,7 +7,7 @@ After=fedora-mountall.service fedora-init-crypto-3.service Requires=fedora-mountall.service fedora-init-crypto-3.service [Service] -ExecStart=/lib/systemd/fedora-swapon +ExecStart=/lib/systemd/fedora-autoswap Type=oneshot TimeoutSec=0 RemainAfterExit=yes |