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