SOURCES: webmin-ad-pld-config.patch (NEW), webmin-PLD-module.info....

sparky sparky at pld-linux.org
Sun Feb 5 01:36:07 CET 2006


Author: sparky                       Date: Sun Feb  5 00:36:07 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- patches added (by Robert Tomasik), patrys ! why haven't you done it ?

---- Files affected:
SOURCES:
   webmin-ad-pld-config.patch (NONE -> 1.1)  (NEW), webmin-PLD-module.info.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/webmin-ad-pld-config.patch
diff -u /dev/null SOURCES/webmin-ad-pld-config.patch:1.1
--- /dev/null	Sun Feb  5 01:36:07 2006
+++ SOURCES/webmin-ad-pld-config.patch	Sun Feb  5 01:36:02 2006
@@ -0,0 +1,2962 @@
+diff -uNr webmin-1.260/apache/config-pld-linux webmin-1.260-PLD/apache/config-pld-linux
+--- webmin-1.260/apache/config-pld-linux	Thu Jan  1 01:00:00 1970
++++ webmin-1.260-PLD/apache/config-pld-linux	Tue Sep 11 22:30:19 2001
+@@ -0,0 +1,7 @@
++show_list=0
++httpd_dir=/etc/httpd
++httpd_path=/usr/sbin/httpd
++mime_types=/etc/mime.types
++start_cmd=/etc/rc.d/init.d/httpd start
++stop_cmd=/etc/rc.d/init.d/httpd stop
++show_order=0
+diff -uNr webmin-1.260/bind8/config-pld-linux webmin-1.260-PLD/bind8/config-pld-linux
+--- webmin-1.260/bind8/config-pld-linux	Thu Jan  1 01:00:00 1970
++++ webmin-1.260-PLD/bind8/config-pld-linux	Tue Sep 11 22:30:19 2001
+@@ -0,0 +1,5 @@
++soa_style=0
++named_path=/usr/sbin/named
++named_conf=/etc/named.conf
++show_list=0
++records_order=0
+diff -uNr webmin-1.260/config-pld-linux webmin-1.260-PLD/config-pld-linux
+--- webmin-1.260/config-pld-linux	Thu Jan  1 01:00:00 1970
++++ webmin-1.260-PLD/config-pld-linux	Tue Sep 11 22:30:19 2001
+@@ -0,0 +1,2 @@
++find_pid_command=ps auwwwx | grep NAME | grep -v grep | awk '{ print $2 }'
++path=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
+diff -uNr webmin-1.260/cron/config-pld-linux webmin-1.260-PLD/cron/config-pld-linux
+--- webmin-1.260/cron/config-pld-linux	Thu Jan  1 01:00:00 1970
++++ webmin-1.260-PLD/cron/config-pld-linux	Tue Sep 11 22:30:19 2001
+@@ -0,0 +1,12 @@
++cron_dir=/var/spool/cron
++cron_deny_file=/etc/cron/cron.deny
++cron_input=1
++cron_delete_command=crontab -u USER -r
++cron_edit_command=crontab -u USER -e
++vixie_cron=1
++cron_deny_all=2
++system_crontab=/etc/crontab
++cron_allow_file=/etc/cron.allow
++cron_get_command=crontab -u USER -l
++run_parts=run-parts
++cronfiles_dir=/etc/cron.d
+diff -uNr webmin-1.260/dhcpd/config-pld-linux webmin-1.260-PLD/dhcpd/config-pld-linux
+--- webmin-1.260/dhcpd/config-pld-linux	Thu Jan  1 01:00:00 1970
++++ webmin-1.260-PLD/dhcpd/config-pld-linux	Tue Sep 11 22:30:19 2001
+@@ -0,0 +1,4 @@
++dhcpd_conf=/etc/dhcpd.conf
++pid_file=/var/run/dhcpd.pid
++dhcpd_path=/usr/sbin/dhcpd
++lease_file=/var/lib/dhcp/dhcpd.leases
+diff -uNr webmin-1.260/exports/config-pld-linux webmin-1.260-PLD/exports/config-pld-linux
+--- webmin-1.260/exports/config-pld-linux	Thu Jan  1 01:00:00 1970
++++ webmin-1.260-PLD/exports/config-pld-linux	Tue Sep 11 22:30:19 2001
+@@ -0,0 +1,3 @@
++restart_command=/etc/rc.d/init.d/nfs restart
++exports_file=/etc/exports
++nfs_server=rpc.nfsd
+diff -uNr webmin-1.260/inetd/config-pld-linux webmin-1.260-PLD/inetd/config-pld-linux
+--- webmin-1.260/inetd/config-pld-linux	Thu Jan  1 01:00:00 1970
++++ webmin-1.260-PLD/inetd/config-pld-linux	Tue Sep 11 22:35:56 2001
+@@ -0,0 +1,14 @@
++show_empty=1
++services_file=/etc/services
++extended_inetd=1
++restart_command=killall -HUP inetd || /etc/rc.d/init.d/rc-inetd start
++rpc_file=/etc/rpc
++protocols_file=/etc/protocols
++tcpd_path=/usr/sbin/tcpd
++rpc_inetd=1
++inetd_conf_file=/etc/inetd.conf
++rpc_protocols=tcp udp
++allow_file=/etc/tcpd/hosts.allow
++deny_file=/etc/tcpd/hosts.deny
++sort_mode=0
++ipv6=1
+diff -uNr webmin-1.260/init/config-pld-linux webmin-1.260-PLD/init/config-pld-linux
+--- webmin-1.260/init/config-pld-linux	Thu Jan  1 01:00:00 1970
++++ webmin-1.260-PLD/init/config-pld-linux	Tue Sep 11 22:30:19 2001
+@@ -0,0 +1,13 @@
++soft_links=1
++show_opts=0
++init_base=/etc/rc.d
++init_dir=/etc/rc.d/init.d
++reboot_command=reboot
++shutdown_command=halt
++order_digits=2
++inittab_id=id
++extra_init=/etc/rc.d/rc.local
++chkconfig=2345
++subsys=/var/lock/subsys
++expert=0
++desc=1
+diff -uNr webmin-1.260/lpadmin/config-pld-linux webmin-1.260-PLD/lpadmin/config-pld-linux
+--- webmin-1.260/lpadmin/config-pld-linux	Thu Jan  1 01:00:00 1970
++++ webmin-1.260-PLD/lpadmin/config-pld-linux	Tue Sep 11 22:30:19 2001
+@@ -0,0 +1,10 @@
++iface_perms=755
++printcap_file=/etc/printcap
++gs_lib=
++iface_arg=
++gs_path=gs
++spool_dir=/var/spool/lpd
++gs_fontpath=
++smbclient_path=smbclient
++print_style=linux
++driver_style=redhat
+diff -uNr webmin-1.260/man/config-pld-linux webmin-1.260-PLD/man/config-pld-linux
+--- webmin-1.260/man/config-pld-linux	Thu Jan  1 01:00:00 1970
++++ webmin-1.260-PLD/man/config-pld-linux	Tue Sep 11 22:30:19 2001
+@@ -0,0 +1,4 @@
++search_cmd=man -k PAGE
++man_dir=/usr/share/man
++man_cmd_sect=man SECTION PAGE
++man_cmd=man PAGE
+diff -uNr webmin-1.260/mount/config-pld-linux webmin-1.260-PLD/mount/config-pld-linux
+--- webmin-1.260/mount/config-pld-linux	Thu Jan  1 01:00:00 1970
++++ webmin-1.260-PLD/mount/config-pld-linux	Tue Sep 11 22:30:19 2001
+@@ -0,0 +1,6 @@
++auto_file=/etc/amd.conf
++autofs_file=/etc/autofs/auto.master
++long_fstypes=1
++fstab_file=/etc/fstab
++smbclient_path=smbclient
++nmblookup_path=nmblookup
+diff -uNr webmin-1.260/mount/pld-linux-lib.pl webmin-1.260-PLD/mount/pld-linux-lib.pl
+--- webmin-1.260/mount/pld-linux-lib.pl	Thu Jan  1 01:00:00 1970
++++ webmin-1.260-PLD/mount/pld-linux-lib.pl	Tue Sep 11 22:30:19 2001
+@@ -0,0 +1,1672 @@
++# linux-lib.pl
++# Mount table functions for linux
++
++if (&has_command("amd")) {
++	local $amd = &read_amd_conf();
++	$amd_support = $amd =~ /\[\s*global\s*\]/i ? 2 : 1;
++	}
++$autofs_support = &has_command("automount");
++if (&has_command("mount.smb")) {
++	$smbfs_support = `mount.smb -v` =~ /username=/i ? 4 : 3;
++	}
++elsif (&has_command("smbmount")) {
++	$smbfs_support = `smbmount -v` =~ /Version\s+2/i ? 2 : 1;
++	}
++$swaps_support = -r "/proc/swaps";
++
++# Return information about a filesystem, in the form:
++#  directory, device, type, options, fsck_order, mount_at_boot
++# If a field is unused or ignored, a - appears instead of the value.
++# Swap-filesystems (devices or files mounted for VM) have a type of 'swap',
++# and 'swap' in the directory field
++sub list_mounts
++{
++local(@rv, @p, @o, $_, $i, $j); $i = 0;
++
++# Get /etc/fstab mounts
++open(FSTAB, $config{fstab_file});
++while(<FSTAB>) {
++	local(@o, $at_boot);
++	chop; s/#.*$//g;
++	if (!/\S/ || /\signore\s/) { next; }
++	@p = split(/\s+/, $_);
++	if ($p[2] eq "proc") { $p[0] = "proc"; }
++	elsif ($p[2] eq "auto") { $p[2] = "*"; }
++	elsif ($p[2] eq "swap") { $p[1] = "swap"; }
++	$rv[$i] = [ $p[1], $p[0], $p[2] ];
++	$rv[$i]->[5] = "yes";
++	@o = split(/,/ , $p[3] eq "defaults" ? "" : $p[3]);
++	if (($j = &indexof("noauto", @o)) >= 0) {
++		# filesytem is not mounted at boot
++		splice(@o, $j, 1);
++		$rv[$i]->[5] = "no";
++		}
++	$rv[$i]->[3] = (@o ? join(',' , @o) : "-");
++	$rv[$i]->[4] = (@p >= 5 ? $p[5] : 0);
++	$i++;
++	}
++close(FSTAB);
++
++if ($amd_support == 1) {
++	# Get old automounter configuration, as used by redhat
++	local $amd = &read_amd_conf();
++	if ($amd =~ /MOUNTPTS='(.*)'/) {
++		@p = split(/\s+/, $1);
++		for($j=0; $j<@p; $j+=2) {
++			$rv[$i++] = [ $p[$j], $p[$j+1], "auto",
++				      "-", 0, "yes" ];
++			}
++		}
++	}
++elsif ($amd_support == 2) {
++	# Guess what? There's now a *new* amd config file format, introduced
++	# in redhat 6.1 and caldera 2.3
++	local @amd = &parse_amd_conf();
++	local @sp = split(/:/, $amd[0]->{'opts'}->{'search_path'});
++	local ($am, $sp);
++	foreach $am (@amd) {
++		local $mn = $am->{'opts'}->{'map_name'};
++		if ($mn !~ /^\//) {
++			foreach $sp (@sp) {
++				if (-r "$sp/$mn") {
++					$mn = "$sp/$mn";
++					last;
++					}
++				}
++			}
++		$rv[$i++] = [ $am->{'dir'}, $mn,
++			      "auto", $am->{'opts'}, 0, "yes" ]
++			if ($am->{'dir'} ne 'global');
++		}
++	}
++
++# Get kernel automounter configuration
++if ($autofs_support) {
++	open(AUTO, $config{'autofs_file'});
++	while(<AUTO>) {
++		chop;
++		s/#.*$//g;
++		if (/^\s*(\S+)\s+(\S+)\s*(.*)$/) {
++			$rv[$i++] = [ $1, $2, "autofs",
++				      ($3 ? &autofs_options($3) : "-"),
++				      0, "yes" ];
++			}
++		}
++	close(AUTO);
++	}
++
++return @rv;
++}
++
++
++# create_mount(directory, device, type, options, fsck_order, mount_at_boot)
++# Add a new entry to the fstab file, old or new automounter file
++sub create_mount
++{
++local(@mlist, @amd, $_); local($opts);
++
++if ($_[2] eq "auto") {
++	if ($amd_support == 1) {
++		# Adding an old automounter mount
++		local $amd = &read_amd_conf();
++		local $m = "$_[0] $_[1]";
++		if ($amd =~ /MOUNTPTS=''/) {
++			$amd =~ s/MOUNTPTS=''/MOUNTPTS='$m'/;
++			}
++		else {
++			$amd =~ s/MOUNTPTS='(.*)'/MOUNTPTS='$1 $m'/;
++			}
++		&write_amd_conf($amd);
++		}
++	elsif ($amd_support == 2) {
++		# Adding a new automounter mount
++		open(AMD, ">>$config{'auto_file'}");
++		print AMD "\n";
++		print AMD "[ $_[0] ]\n";
++		print AMD "map_name = $_[1]\n";
++		close(AMD);
++		}
++	}
++elsif ($_[2] eq "autofs") {
++	# Adding a new automounter mount
++	open(AUTO, ">> $config{'autofs_file'}");
++	print AUTO "$_[0]  $_[1]";
++	if ($_[3]) { print AUTO "  ",&autofs_args($_[3]); }
++	print AUTO "\n";
++	close(AUTO);
++	}
++else {
++	# Adding a normal mount to the fstab file
++	open(FSTAB, ">> $config{fstab_file}");
++	print FSTAB "$_[1]  $_[0]  $_[2]";
++	$opts = $_[3] eq "-" ? "" : $_[3];
++	if ($_[5] eq "no") {
++		$opts = join(',' , (split(/,/ , $opts) , "noauto"));
++		}
++	if ($opts eq "") { print FSTAB "  defaults"; }
++	else { print FSTAB "  $opts"; }
++	print FSTAB "  0  ";
++	print FSTAB $_[4] eq "-" ? "0\n" : "$_[4]\n";
++	close(FSTAB);
++	}
++}
++
++
++# change_mount(num, directory, device, type, options, fsck_order, mount_at_boot)
++# Change an existing permanent mount
++sub change_mount
++{
++local($i, @fstab, $line, $opts, $j, @amd);
++$i = 0;
++
++# Update fstab file
++open(FSTAB, $config{fstab_file});
++ at fstab = <FSTAB>;
++close(FSTAB);
++open(FSTAB, "> $config{fstab_file}");
++foreach (@fstab) {
++	chop; ($line = $_) =~ s/#.*$//g;
++	if ($line =~ /\S/ && $line !~ /\signore\s/ && $i++ == $_[0]) {
++		# Found the line to replace
++		print FSTAB "$_[2]  $_[1]  $_[3]";
++		$opts = $_[4] eq "-" ? "" : $_[4];
++		if ($_[6] eq "no") {
++			$opts = join(',' , (split(/,/ , $opts) , "noauto"));
++			}
++		if ($opts eq "") { print FSTAB "  defaults"; }
++		else { print FSTAB "  $opts"; }
++		print FSTAB "  0  ";
++		print FSTAB $_[5] eq "-" ? "0\n" : "$_[5]\n";
++		}
++	else { print FSTAB $_,"\n"; }
++	}
++close(FSTAB);
++
++if ($amd_support == 1) {
++	# Update older amd configuration
++	local $amd = &read_amd_conf();
++	if ($amd =~ /MOUNTPTS='(.*)'/) {
++		# found mount points line..
++		local @mpts = split(/\s+/, $1);
++		for($j=0; $j<@mpts; $j+=2) {
++			if ($i++ == $_[0]) {
++				$mpts[$j] = $_[1];
++				$mpts[$j+1] = $_[2];
++				}
++			}
++		local $mpts = join(" ", @mpts);
++		$amd =~ s/MOUNTPTS='(.*)'/MOUNTPTS='$mpts'/;
++		}
++	&write_amd_conf($amd);
++	}
++elsif ($amd_support == 2) {
++	# Update new amd configuration
++	local @amd = &parse_amd_conf();
++	local $lref = &read_file_lines($config{'auto_file'});
++	foreach $am (@amd) {
++		next if ($am->{'dir'} eq 'global');
++		if ($i++ == $_[0]) {
++			local @nl = ( "[ $_[1] ]" );
++			local %opts = %{$am->{'opts'}};
++			$opts->{'map_name'} = $_[2];
++			foreach $o (keys %opts) {
++				push(@nl, "$o = $opts{$o}");
++				}
++			splice(@$lref, $am->{'line'},
++			       $am->{'eline'} - $am->{'line'} + 1, @nl);
++			}
++		}
++	&flush_file_lines();
++	}
++
++# Update autofs configuration
++if ($autofs_support) {
++	open(AUTO, $config{'autofs_file'});
++	@auto = <AUTO>;
++	close(AUTO);
++	open(AUTO, "> $config{'autofs_file'}");
++	foreach (@auto) {
++		chop; ($line = $_) =~ s/#.*$//g;
++		if ($line =~ /\S/ && $i++ == $_[0]) {
++			print AUTO "$_[1]  $_[2]";
++			if ($_[4]) { print AUTO "  ",&autofs_args($_[4]); }
++			print AUTO "\n";
++			}
++		else { print AUTO $_,"\n"; }
++		}
++	close(AUTO);
++	}
++}
++
++
++# delete_mount(index)
++# Delete an existing permanent mount
++sub delete_mount
++{
++local($i, @fstab, $line, $opts, $j, @amd);
++$i = 0;
++
++# Update fstab file
++open(FSTAB, $config{fstab_file});
++ at fstab = <FSTAB>;
++close(FSTAB);
++open(FSTAB, "> $config{fstab_file}");
++foreach (@fstab) {
++	chop; ($line = $_) =~ s/#.*$//g;
++	if ($line !~ /\S/ || $line =~ /\signore\s/ || $i++ != $_[0]) {
++		# Don't delete this line
++		print FSTAB $_,"\n";
++		}
++	}
++close(FSTAB);
++
++if ($amd_support == 1) {
++	# Update older amd configuration
++	local $amd = &read_amd_conf();
++	if ($amd =~ /MOUNTPTS='(.*)'/) {
++		# found mount points line..
++		local @mpts = split(/\s+/, $1);
++		for($j=0; $j<@mpts; $j+=2) {
++			if ($i++ == $_[0]) {
++				splice(@mpts, $j, 2);
++				}
++			}
++		local $mpts = join(" ", @mpts);
++		$amd =~ s/MOUNTPTS='(.*)'/MOUNTPTS='$mpts'/;
++		}
++	&write_amd_conf($amd);
++	}
++elsif ($amd_support == 2) {
++	# Update new amd configuration
++	local @amd = &parse_amd_conf();
++	local $lref = &read_file_lines($config{'auto_file'});
++	foreach $am (@amd) {
++		next if ($am->{'dir'} eq 'global');
++		if ($i++ == $_[0]) {
++			splice(@$lref, $am->{'line'},
++			       $am->{'eline'} - $am->{'line'} + 1);
++			}
++		}
++	&flush_file_lines();
++	}
++
++
++
++# Update AMD file
++if ($amd_support) {
++	open(AMD, $config{auto_file});
++	@amd = <AMD>;
++	close(AMD);
++	open(AMD, "> $config{auto_file}");
++	foreach (@amd) {
++		if (/MOUNTPTS='(.*)'/) {
++			# found mount points line..
++			@mpts = split(/\s+/, $1);
++			for($j=0; $j<@mpts; $j+=2) {
++				if ($i++ != $_[0]) {
++					push(@nmpts, $mpts[$j]);
++					push(@nmpts, $mpts[$j+1]);
++					}
++				}
++			print AMD "MOUNTPTS='".join(' ', @nmpts)."'\n";
++			}
++		else { print AMD $_; }
++		}
++	close(AMD);
++	}
++
++# Update autofs file
++if ($autofs_support) {
++	open(AUTO, $config{'autofs_file'});
++	@auto = <AUTO>;
++	close(AUTO);
++	open(AUTO, "> $config{'autofs_file'}");
++	foreach (@auto) {
++		chop; ($line = $_) =~ s/#.*$//g;
++		if ($line !~ /\S/ || $i++ != $_[0]) {
++			# keep this line
++			print AUTO $_,"\n";
++			}
++		}
++	close(AUTO);
++	}
++}
++
++
++# list_mounted()
++# Return a list of all the currently mounted filesystems and swap files.
++# The list is in the form:
++#  directory device type options
++sub list_mounted
++{
++local(@rv, @p, @o, $mo, $_, %smbopts);
++
++&read_smbopts();
++open(MTAB, "/etc/mtab");
++while(<MTAB>) {
++	chop;
++	s/#.*$//g; if (!/\S/) { next; }
++	@p = split(/\s+/, $_);
++	if ($p[2] eq "auto" || $p[0] =~ /^\S+:\(pid\d+\)$/) {
++		# Automounter map.. turn the map= option into the device
++		@o = split(/,/ , $p[3]);
++		($mo) = grep {/^map=/} (@o);
++		$mo =~ /^map=(.*)$/; $p[0] = $1;
++		$p[3] = join(',' , grep {!/^map=/} (@o));
++		$p[2] = "auto";
++		}
++	elsif ($p[2] eq "autofs") {
++		# Kernel automounter map.. use the pid to find the map
++		$p[0] =~ /automount\(pid(\d+)\)/ || next;
++		$out = `ps hwwww $1`;
++		$out =~ /automount\s+(.*)\s*(\S+)\s+(file|program|yp)(,\S+)?\s+(\S+)/ || next;
++		$p[0] = $5;
++		$p[3] = $1 ? &autofs_options($1) : "-";
++		}
++	elsif ($p[2] eq "smbfs") {
++		# Change from //FOO/BAR to \\foo\bar
++		$p[0] =~ s/\//\\/g;
++		$p[0] = lc($p[0]);
++		$p[3] = $smbopts{$p[1]};
++		}
++	elsif ($p[2] eq "proc") {
++		# The source for proc mounts is always proc
++		$p[0] = "proc";
++		}
++	push(@rv, [ $p[1], $p[0], $p[2], $p[3] ]);
++	}
++close(MTAB);
++open(SWAPS, "/proc/swaps");
++while(<SWAPS>) {
++	chop;
++	if (/^(\/\S+)\s+/) {
++		push(@rv, [ "swap", $1, "swap", "-" ]);
++		}
++	}
++close(SWAPS);
++return @rv;
++}
++
++
++# mount_dir(directory, device, type, options)
++# Mount a new directory from some device, with some options. Returns 0 if ok,
++# or an error string if failed
++sub mount_dir
++{
++local($out, $opts, $shar, %options, %smbopts);
++if ($_[2] eq "swap") {
++	# Use swapon to add the swap space..
++	$out = `swapon $_[1] 2>&1`;
++	if ($out =~ /Invalid argument/) {
++		# looks like this swap partition isn't ready yet.. set it up
++		$out = `mkswap $_[1] 2>&1`;
++		if ($?) { return "mkswap failed : <pre>$out</pre>"; }
++		$out = `swapon $_[1] 2>&1`;
++		}
++	if ($?) { return "<pre>$out</pre>"; }
++	}
++elsif ($_[2] eq "auto") {
++	# Old automounter filesystem
++	$out = `amd $_[0] $_[1] >/dev/null 2>/dev/null`;
++	if ($?) { return $text{'linux_eamd'}; }
++	}
++elsif ($_[2] eq "autofs") {
++	# New automounter filesystem
++	$opts = &autofs_args($_[3]);
++	$type = $_[1] !~ /^\// ? "yp" :
++		(-x $_[1]) ? "program" : "file";
++	$out = `automount $opts $_[0] $type $_[1] 2>&1`;
++	if ($?) { return &text('linux_eauto', "<pre>$out</pre>"); }
++	}
++elsif ($_[2] eq "smbfs") {
++	local $shar = $_[1];
++	$shar =~ s/\\/\//g;
++	if ($smbfs_support >= 3) {
++		# SMB filesystem mounted with mount command
++		$opts = $_[3] eq "-" ? "" : "-o \"$_[3]\"";
++		$out = `mount -t $_[2] $opts $shar $_[0] 2>&1`;
++		if ($? || $out =~ /failed/i) {
++			system("umount $_[0] >/dev/null 2>&1");
++			return "<pre>$out</pre>";
++			}
++		}
++	elsif ($smbfs_support == 2) {
++		# SMB filesystem mounted with version 2.x smbmount
++		&parse_options("smbfs", $_[3]);
++		$opts =
++		    ($options{'user'} ? "-U $options{'user'} " : "").
++		    ($options{'passwd'} ? "" : "-N ").
++		    ($options{'workgroup'} ? "-W $options{'workgroup'} " : "").
++		    ($options{'clientname'} ? "-n $options{'clientname'} " : "").
++		    ($options{'machinename'} ? "-I $options{'machinename'} " : "");
++		&foreign_require("proc", "proc-lib.pl");
++		local ($fh, $fpid) = &foreign_call(
++			"proc", "pty_process_exec", "sh", "-c",
++			"smbmount $shar $_[0] -d 0 $opts");
++		if ($options{'passwd'}) {
++			local $w = &wait_for($fh, "word:");
++			if ($w < 0) {
++				system("umount $_[0] >/dev/null 2>&1");
++				return $text{'linux_esmbconn'};
++				}
++			local $p = "$options{'passwd'}\n";
++			syswrite($fh, $p, length($p));
++			}
++		local $got;
++		while(<$fh>) {
++			$got .= $_;
++			}
++		if ($got =~ /failed/) {
++			system("umount $_[0] >/dev/null 2>&1");
++			return "<pre>$got</pre>\n";
++			}
++		close($fh);
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list