diff options
Diffstat (limited to 'perl-install/standalone/interactive_http')
| -rw-r--r-- | perl-install/standalone/interactive_http/.perl_checker | 1 | ||||
| -rwxr-xr-x[-rw-r--r--] | perl-install/standalone/interactive_http/index.html.pl | 0 | ||||
| -rwxr-xr-x | perl-install/standalone/interactive_http/interactive_http.cgi | 23 | ||||
| -rw-r--r-- | perl-install/standalone/interactive_http/miniserv.init | 10 | ||||
| -rwxr-xr-x[-rw-r--r--] | perl-install/standalone/interactive_http/miniserv.pl | 0 | 
5 files changed, 22 insertions, 12 deletions
| diff --git a/perl-install/standalone/interactive_http/.perl_checker b/perl-install/standalone/interactive_http/.perl_checker new file mode 100644 index 000000000..7c4e4338a --- /dev/null +++ b/perl-install/standalone/interactive_http/.perl_checker @@ -0,0 +1 @@ +Basedir ../..
\ No newline at end of file diff --git a/perl-install/standalone/interactive_http/index.html.pl b/perl-install/standalone/interactive_http/index.html.pl index afd91459b..afd91459b 100644..100755 --- a/perl-install/standalone/interactive_http/index.html.pl +++ b/perl-install/standalone/interactive_http/index.html.pl diff --git a/perl-install/standalone/interactive_http/interactive_http.cgi b/perl-install/standalone/interactive_http/interactive_http.cgi index 4da796719..24899c451 100755 --- a/perl-install/standalone/interactive_http/interactive_http.cgi +++ b/perl-install/standalone/interactive_http/interactive_http.cgi @@ -8,7 +8,7 @@ use c;  my $q = CGI->new;  $| = 1; -my $script_name = $q->url(-relative => 1); +my $script_name = $q->url('-relative' => 1);  # name inversed (must be in sync with interactive_http.html)  my $pipe_r = "/tmp/interactive_http_w"; @@ -27,24 +27,23 @@ if ($q->param('state') eq 'new') {      error("booh...");  } -sub read_ { -    local *F; -    open F, "<$pipe_r" or error("Failed to connect to the prog"); +sub read_() { +    open my $F, "<$pipe_r" or error("Failed to connect to the prog");      my $t; -    print $t while sysread F, $t, 1; +    print $t while sysread $F, $t, 1;  } -sub write_ { +sub write_() {      local *F;      open F, ">$pipe_w" or die;      my $q = CGI->new;      $q->save(\*F);  } -sub first_step { read_() } -sub next_step { write_(); read_() } +sub first_step() { read_() } +sub next_step() { write_(); read_() } -sub force_exit_dead_prog { +sub force_exit_dead_prog() {      -p $pipe_w or return;      {  	local *F; @@ -65,7 +64,7 @@ sub spawn_server {      my @authorised_progs = map { chomp_($_) } cat_('/etc/drakxtools_http/authorised_progs');      member($prog, @authorised_progs) or error("You tried to call a non-authorised program"); -    fork and return; +    fork() and return;      $ENV{INTERACTIVE_HTTP} = $script_name; @@ -78,9 +77,9 @@ sub spawn_server {  }  sub error { -    print $q->header(), $q->start_html(); +    print $q->header, $q->start_html;      print $q->h1(N("Error")), @_; -    print $q->end_html(), "\n"; +    print $q->end_html, "\n";      exit 0;  } diff --git a/perl-install/standalone/interactive_http/miniserv.init b/perl-install/standalone/interactive_http/miniserv.init index c9aaf9aeb..c130cd270 100644 --- a/perl-install/standalone/interactive_http/miniserv.init +++ b/perl-install/standalone/interactive_http/miniserv.init @@ -1,6 +1,16 @@  #!/bin/sh  # chkconfig: 235 99 00  # description: Start or stop the miniserv administration server +### BEGIN INIT INFO +# Provides: drakxtools_http +# Required-Start: +# Required-Stop: +# Should-Start: $network +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Web administration server for Mageia utilities +# Description: Start or stop the miniserv administration server for Mageia utilities +### END INIT INFO  # Source function library.  . /etc/rc.d/init.d/functions diff --git a/perl-install/standalone/interactive_http/miniserv.pl b/perl-install/standalone/interactive_http/miniserv.pl index b11ce26e2..b11ce26e2 100644..100755 --- a/perl-install/standalone/interactive_http/miniserv.pl +++ b/perl-install/standalone/interactive_http/miniserv.pl | 
