Commit 9762dedc authored by Mike Hibler's avatar Mike Hibler

Duh! Only put out the "added by" comment if we actually add something!

parent c492861a
......@@ -267,10 +267,12 @@ sub fix_swap_partitions
}
@buffer = grep {!/^[^#].*\bswap\b.*$/} <FSTAB>;
if (@swapdevs > 0) {
push @buffer, "# the following swap devices added by linux_slicefix\n";
for (@swapdevs) {
push @buffer, "$_\tnone\tswap\tsw\t0 0\n";
}
}
seek FSTAB, 0, 0;
print FSTAB @buffer;
close FSTAB;
......
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