diff options
Diffstat (limited to 'perl-install/swap.pm')
-rw-r--r-- | perl-install/swap.pm | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/perl-install/swap.pm b/perl-install/swap.pm deleted file mode 100644 index 564513ad9..000000000 --- a/perl-install/swap.pm +++ /dev/null @@ -1,32 +0,0 @@ -package swap; # $Id$ - -use diagnostics; -use strict; - -use common; -use log; -use devices; - -sub make { - my ($dev, $checkBlocks) = @_; - run_program::raw({ timeout => 60 * 60 }, "mkswap", if_($checkBlocks, '-c'), devices::make($dev)) or die N("%s formatting of %s failed", 'swap', $dev); -} - -sub enable { - my ($dev, $checkBlocks) = @_; - make($dev, $checkBlocks); - swapon($dev); -} - -sub swapon { - my ($dev) = @_; - log::l("swapon called with $dev"); - syscall_('swapon', devices::make($dev), 0) or die "swapon($dev) failed: $!"; -} - -sub swapoff($) { - my ($dev) = @_; - syscall_('swapoff', devices::make($dev)) or die "swapoff($dev) failed: $!"; -} - -1; |