#!/usr/bin/perl -w
use Cwd;
-#print "Content-type: text/html\n\n";
+print "Content-type: text/html\n\n";
my $pwd = &Cwd::cwd();
+my $file = "pwr.conf";
+if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
+ $file = "htdocs/tools/pwr/".$file;
+ }
-open(LESEN,"htdocs/tools/pwr/pwr.conf")
+
+
+open(LESEN,$file)
or die "Fehler beim oeffnen von : $!\n";
while(defined(my $i = <LESEN>)) {
//PWRSPLY:/path/to/device:speed:Name:Type:Channels
//type can be HMP, PSP, PST
-PWRSPLY:/dev/ttyUSB0:38400:HMP4030:HMP:3
-PWRSPLY:/dev/ttyUSB1:2400:PSP-405:PSP:1
-#PWRSPLY:/dev/ttyUSB0:9600:PST3202:PST:3
-
+PWRSPLY:/dev/ttyUSB0:115200:HMP4030:HMP:3
#!/usr/bin/perl -w
-#print "Content-type: text/html\n\n";
+print "Content-type: text/html\n\n";
use strict;
}
}
else {
- usleep(50000);
+ usleep(40000);
}
}
return $ret;
#!/usr/bin/perl -w
-#print "Content-type: text/html\r\n\r\n";
+print "Content-type: text/html\r\n\r\n";
use Cwd;
my $pwd = &Cwd::cwd();
+my $file = "pwr.conf";
+if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
+ $file = "htdocs/tools/pwr/".$file;
+ }
-open(LESEN,"htdocs/tools/pwr/pwr.conf")
+
+open(LESEN,$file)
or print "Fehler beim oeffnen von : $!\n";
while(defined(my $i = <LESEN>)) {
#!/usr/bin/perl -w
-
+print "Content-type: text/html\r\n\r\n";
my $envstring = $ENV{'QUERY_STRING'};
$envstring =~ s/%20/ /g;
##$envstring =~ s/&/\n/g;
-open(SCHREIBEN,">htdocs/tools/pwr/pwr.conf")
+my $file = "pwr.conf";
+if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) {
+ $file = "htdocs/tools/pwr/".$file;
+ }
+
+
+open(SCHREIBEN,">$file")
or print "Fehler beim oeffnen von : $!\n";
print SCHREIBEN $envstring;
sub nsecmodel {
&log;
($x,$x,$x,$x,$uid,$gid) = stat(S);
- (!$uid || !$gid || $uid < 1000) &&
+ (!$uid || !$gid || $uid < 10) &&
die "resource is root-owned, secured or not stat-able\n";
if (!$<) {
($) = "$gid $gid") || die "can't set egid to $gid";