summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/convert
blob: f860392977563361065844def2a67a401ce7f771 (plain)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/perl
use Storable;
use MDK::Common::File qw(cat_);
 
my $last_boot_config = "/etc/sysconfig/harddrake2/previous_hw";
 
if (cat_($last_boot_config) !~ /^pst0/) {
    my $config = do $last_boot_config;
    store($config, $last_boot_config);
}
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
#!/usr/bin/perl

use lib qw(/usr/lib/libDrakX);
use CGI;
use common;
use c;

my $q = CGI->new;
$| = 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";
my $pipe_w = "/tmp/interactive_http_r";

if ($q->param('state') eq 'new') {
    force_exit_dead_prog();
    mkfifo($pipe_r); mkfifo($pipe_w);

    spawn_server($q->param('prog'));
    first_step();

} elsif ($q->param('state') eq 'next_step') {
    next_step();
} else {
    error("booh...");
}

sub read_ {
    local *F;
    open F, "<$pipe_r" or error("Failed to connect to the prog");