summaryrefslogtreecommitdiffstats
path: root/perl-install/fs
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/fs')
-rw-r--r--perl-install/fs/dmcrypt.pm30
-rw-r--r--perl-install/fs/dmraid.pm16
2 files changed, 46 insertions, 0 deletions
diff --git a/perl-install/fs/dmcrypt.pm b/perl-install/fs/dmcrypt.pm
index 0cb73a848..f26bad391 100644
--- a/perl-install/fs/dmcrypt.pm
+++ b/perl-install/fs/dmcrypt.pm
@@ -11,8 +11,22 @@ use fs::type;
use fs::get;
use run_program;
+=head1 SYNOPSYS
+
+Manage encrypted file systems using cryptsetup
+
+=over
+
+=cut
+
sub _crypttab() { "$::prefix/etc/crypttab" }
+=item init()
+
+Load kernel modules and init device mapper.
+
+=cut
+
sub init() {
whereis_binary('cryptsetup') or die "cryptsetup not installed";
@@ -44,6 +58,12 @@ sub read_crypttab_ {
}
}
+=item read_crypttab($all_hds)
+
+Read /etc/crypttab
+
+=cut
+
sub read_crypttab {
my ($all_hds) = @_;
read_crypttab_($all_hds, _crypttab());
@@ -67,6 +87,12 @@ sub save_crypttab_ {
} $crypttab;
}
+=item save_crypttab($all_hds)
+
+Save /etc/crypttab
+
+=cut
+
sub save_crypttab {
my ($all_hds) = @_;
save_crypttab_($all_hds, _crypttab());
@@ -176,4 +202,8 @@ sub active_dm() {
} run_program::get_stdout('dmsetup', 'table');
}
+=back
+
+=cut
+
1;
diff --git a/perl-install/fs/dmraid.pm b/perl-install/fs/dmraid.pm
index 851171c2f..657899b13 100644
--- a/perl-install/fs/dmraid.pm
+++ b/perl-install/fs/dmraid.pm
@@ -14,6 +14,18 @@ use fs::wild_device;
use run_program;
+=head1 SYNOPSYS
+
+Manage fake RAIDs using dmraid
+
+=over
+
+=item init()
+
+Load kernel modules, init device mapper then scan for fake RAIDs.
+
+=cut
+
sub init() {
whereis_binary('dmraid') or die "dmraid not installed";
@@ -253,4 +265,8 @@ EOF
$@ and die;
}
+=back
+
+=cut
+
1;