diff --git a/postplug.d/10filesystems b/postplug.d/10filesystems index b3b55c9..154c753 100644 --- a/postplug.d/10filesystems +++ b/postplug.d/10filesystems @@ -234,7 +234,7 @@ blkid | grep /dev/sd | while read line; do case $devfstype in linux-swap|swap) # Linux swap [ "$FS_SWAP_UPDATE" = "yes" ] || continue - mount_point="swap" + mount_point="swap " fstype="swap" options="pri=1" let "swapon = 1" ;; @@ -288,9 +288,6 @@ blkid | grep /dev/sd | while read line; do ;; esac - logmsg "$me" $"\ -added device \`$dev' (${uuid}) mount point:\`$mount_point'" - # note: if 'mount_point' is yet undefined there is a bug if [[ "$mount_point" ]]; then # default values: fstype="auto", options="noauto,user" @@ -299,16 +296,20 @@ added device \`$dev' (${uuid}) mount point:\`$mount_point'" echo "\ UUID=${uuid} $mount_point \ ${fstype:-"auto"} ${options:-"noauto,user"}${extra_options} ${check_options}" >> $fstab + [ "$fstype" = "swap" ] && /sbin/swapon -p 1 ${uuid} else echo "\ $dev $mount_point \ ${fstype:-"auto"} ${options:-"noauto,user"}${extra_options} ${check_options}" >> $fstab + [ "$fstype" = "swap" ] && /sbin/swapon -p 1 ${dev} fi # create the mount point and mount the new device [ "${mount_point:0:${#rootmp}}" = "${rootmp}" ] && { mkdir -p "$mount_point" mount "$mount_point" } + logmsg "$me" $"\ +added device \`$dev' (${uuid}) mount point:\`$mount_point'" fi fi done diff --git a/postplug/postplug-service b/postplug/postplug-service index 3dcfca7..b195dd0 100644 --- a/postplug/postplug-service +++ b/postplug/postplug-service @@ -2,7 +2,7 @@ Description=openmamba system configuration script DefaultDependencies=no After=systemd-udev-trigger.service systemd-remount-fs.service -Before=swap.target sysinit.target +Before=sysinit.target [Service] Type=oneshot