Commit b64321a5 authored by David Johnson's avatar David Johnson

Handle case in the systemd fstab generator where there is no swap partition.

parent 1fb10ab7
......@@ -258,7 +258,7 @@ done < $FSTAB
# Finally, if we didn't see the Emulab swap partition in fstab, add it
# and a unit for it. This is sub-optimal because we're not using the
# systemd swap file template, but nothing else to do.
if [ $haveemulabswap -eq 0 ]; then
if [ $haveemulabswap -eq 0 -a -n "$emulabswapdev" ]; then
# If it is already formatted, it will have a uuid.
uuid=`blkid $emulabswapdev | grep "TYPE=['\"]swap['\"]" | sed -n -r -e "s/^[^ \t]*[ \t]UUID=['\"]([^'\"]*)['\"].*$/\1/p"`
if [ -z "$uuid" ]; then
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