summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-13 19:03:01 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-13 19:03:01 +0000
commit7e8dafb1d5172f74dd5204ab4009d7f19b6d1d5d (patch)
treefb120c22302447a807c3673e3371e471254b1dfd
parentaa19bdfd007143ebe13a762072ab12302b8f3a74 (diff)
downloaddrakx-7e8dafb1d5172f74dd5204ab4009d7f19b6d1d5d.tar
drakx-7e8dafb1d5172f74dd5204ab4009d7f19b6d1d5d.tar.gz
drakx-7e8dafb1d5172f74dd5204ab4009d7f19b6d1d5d.tar.bz2
drakx-7e8dafb1d5172f74dd5204ab4009d7f19b6d1d5d.tar.xz
drakx-7e8dafb1d5172f74dd5204ab4009d7f19b6d1d5d.zip
backend davfs (WebDAV) support
-rw-r--r--perl-install/diskdrake/interactive.pm1
-rw-r--r--perl-install/fs.pm7
-rw-r--r--perl-install/fsedit.pm4
-rw-r--r--perl-install/network/dav.pm11
4 files changed, 19 insertions, 4 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index f187cf409..f7a16567d 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -148,6 +148,7 @@ struct all_hds {
raw_hd raw_hds[]
raw_hd nfss[]
raw_hd smbs[]
+ raw_hd davs[]
raw_hd special[]
# internal: if fstab_to_string($all_hds) eq current_fstab then no need to save
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 4ebf33f37..01f8f3ac4 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -140,6 +140,7 @@ sub add2all_hds {
my $s =
isThisFs('nfs', $_) ? 'nfss' :
isThisFs('smbfs', $_) ? 'smbs' :
+ isThisFs('davfs', $_) ? 'davs' :
'special';
push @{$all_hds->{$s}}, $_;
}
@@ -202,7 +203,7 @@ sub prepare_write_fstab {
my @smb_credentials;
my @l = map {
my $device =
- $_->{device} eq 'none' || member($_->{type}, qw(nfs smbfs)) ?
+ $_->{device} eq 'none' || member($_->{type}, qw(nfs smbfs davfs)) ?
$_->{device} :
isLoopback($_) ?
($_->{mntpoint} eq '/' ? "/initrd/loopfs" : "$_->{loopback_device}{mntpoint}") . $_->{loopback_file} :
@@ -312,6 +313,7 @@ sub mount_options_unpack {
vfat => [ qw(umask=0) ],
nfs => [ qw(rsize=8192 wsize=8192) ],
smbfs => [ qw(username= password=) ],
+ davfs => [ qw(username= password= uid= gid=) ],
reiserfs => [ 'notail' ],
);
push @{$per_fs{$_}}, 'usrquota', 'grpquota' foreach 'ext2', 'ext3', 'xfs';
@@ -525,6 +527,7 @@ sub get_raw_hds {
my @fstab = read_fstab($prefix, "/etc/fstab", 'all_options');
$all_hds->{nfss} = [ grep { isThisFs('nfs', $_) } @fstab ];
$all_hds->{smbs} = [ grep { isThisFs('smbfs', $_) } @fstab ];
+ $all_hds->{davs} = [ grep { isThisFs('davfs', $_) } @fstab ];
$all_hds->{special} = [
(grep { isThisFs('tmpfs', $_) } @fstab),
{ device => 'none', mntpoint => '/proc', type => 'proc' },
@@ -680,7 +683,7 @@ sub mount {
my @fs_modules = qw(vfat hfs romfs ufs reiserfs xfs jfs ext3);
- if (member($fs, 'smb', 'smbfs', 'nfs', 'ntfs') && $::isStandalone) {
+ if (member($fs, 'smb', 'smbfs', 'nfs', 'davfs', 'ntfs') && $::isStandalone) {
system('mount', '-t', $fs, $dev, $where, '-o', $options) == 0 or die _("mounting partition %s in directory %s failed", $dev, $where);
return; #- do not update mtab, already done by mount(8)
} elsif (member($fs, 'ext2', 'proc', 'usbdevfs', 'iso9660', @fs_modules)) {
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 678764245..8dda77319 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -79,7 +79,7 @@ sub typeOfPart {
#- Functions
#-######################################################################################
sub empty_all_hds {
- { hds => [], lvms => [], raids => [], loopbacks => [], raw_hds => [], nfss => [], smbs => [], special => [] };
+ { hds => [], lvms => [], raids => [], loopbacks => [], raw_hds => [], nfss => [], smbs => [], davs => [], special => [] };
}
sub recompute_loopbacks {
my ($all_hds) = @_;
@@ -311,7 +311,7 @@ sub get_really_all_fstab {
my ($all_hds) = @_;
my @parts = map { partition_table::get_normal_parts($_) } all_hds($all_hds);
my @raids = grep { $_ } @{$all_hds->{raids}};
- @parts, @raids, @{$all_hds->{loopbacks}}, @{$all_hds->{raw_hds}}, @{$all_hds->{nfss}}, @{$all_hds->{smbs}};
+ @parts, @raids, @{$all_hds->{loopbacks}}, @{$all_hds->{raw_hds}}, @{$all_hds->{nfss}}, @{$all_hds->{smbs}}, @{$all_hds->{davs}};
}
sub get_all_fstab_and_holes {
my ($all_hds) = @_;
diff --git a/perl-install/network/dav.pm b/perl-install/network/dav.pm
new file mode 100644
index 000000000..3e5568f27
--- /dev/null
+++ b/perl-install/network/dav.pm
@@ -0,0 +1,11 @@
+package network::dav; # $Id$
+
+use strict;
+use diagnostics;
+
+use common;
+
+sub check {
+ my ($class, $in) = @_;
+ $class->raw_check($in, 'davfs', '/sbin/mount.davfs');
+}