Changeset 251
- Timestamp:
- 06/13/07 10:52:02 (1 year ago)
- Files:
-
- trunk/webmin/lsc/debian/control (modified) (1 diff)
- trunk/webmin/lsc/include/copy.inc.php (modified) (2 diffs)
- trunk/webmin/lsc/include/ssh.inc.php (modified) (1 diff)
- trunk/webmin/lsc/xprobe_safe (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/webmin/lsc/debian/control
r227 r251 9 9 Section: utils 10 10 Architecture: all 11 Depends: webmin, php4, php4-cgi, webmin-lbs-common, php4-mysql, mysql-client (>> 4.0.0) | mysql-client-4.1 , xprobe (>> 0.2.0)11 Depends: webmin, php4, php4-cgi, webmin-lbs-common, php4-mysql, mysql-client (>> 4.0.0) | mysql-client-4.1 12 12 Recommends: samba-common 13 13 Suggests: lbs trunk/webmin/lsc/include/copy.inc.php
r227 r251 92 92 $basename = trim(basename($f)); 93 93 debug(2, "LSC_COPY : Dirname : \"".$dirname."\" Basename : \"".trim($basename)."\""); 94 95 /* 96 * chmod +x on *.bat and *.exe 97 */ 98 $chmod_command = "find $path_source -iname '*.exe' -or -iname '*.bat' -exec chmod 755 {} \\;"; 99 unset($output); unset($stdout); unset($stderr); unset($return_var); 100 lsc_exec($chmod_command, $output, $return_var, $stdout, $stderr); 101 94 102 /* 95 103 * Make directory step 96 */ 97 104 */ 98 105 unset($output); unset($return_var); unset($stdout); unset($stderr); 99 106 $mkdir_command = "test -d '".$path_destination."' || mkdir -p '".$path_destination."'"; … … 160 167 } 161 168 debug(1, sprintf("File successfully copied, command is %s", $scp_command)); 162 163 /*164 * chmod +x on *.bat and *.exe165 */166 $chmod_command = "chmod ugo+x -R \"$path_destination_mount_ssh\"/*.exe";167 unset($output); unset($stdout); unset($stderr); unset($return_var);168 lsc_exec($chmod_command, $output, $return_var, $stdout, $stderr);169 170 $chmod_command = "chmod ugo+x -R \"$path_destination_mount_ssh\"/*.bat";171 unset($output); unset($stdout); unset($stderr); unset($return_var);172 lsc_exec($chmod_command, $output, $return_var, $stdout, $stderr);173 169 } 174 170 return $result; trunk/webmin/lsc/include/ssh.inc.php
r250 r251 407 407 unset($output); unset($return_var); unset($stdout); unset($stderr); 408 408 lsc_exec("./xprobe_safe ".$this->ip, $output, $return_var, $stdout, $stderr); 409 $key = LSC_arrayEreg("Running OS", $output); 410 $type = $output[$key]; 409 $type = join("\n", $output); 411 410 } else { 412 411 $type = $known_type; trunk/webmin/lsc/xprobe_safe
r250 r251 1 1 #!/usr/bin/perl 2 2 3 $pid = open(PIPE, " xprobe2 -M 6 $ARGV[0] 2>&1|") or die $!;3 $pid = open(PIPE, "ssh -tt -o StrictHostKeyChecking=no -o Batchmode=yes root@".$ARGV[0]." 'echo \$OS;uname' |") or die $!; 4 4 eval { 5 5 local $SIG{ALRM} = sub { die "TIMEDOUT" }; 6 6 alarm(10); 7 while (<PIPE>) { print <PIPE>; };7 while(<PIPE>) { print $_; }; 8 8 close(PIPE); 9 9 alarm(0);
