Subversion Repositories DevTools

Rev

Rev 6547 | Rev 6738 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6547 Rev 6689
Line 2064... Line 2064...
2064
    $script = ResolveFile($from_package, $script );
2064
    $script = ResolveFile($from_package, $script );
2065
 
2065
 
2066
    my $tdir = $sk100 ?  "/etc/init.d/init.vix.d" : "/etc/init.d/init.d";
2066
    my $tdir = $sk100 ?  "/etc/init.d/init.vix.d" : "/etc/init.d/init.d";
2067
    $tdir = catdir($basedir, $tdir);
2067
    $tdir = catdir($basedir, $tdir);
2068
    my $base = StripDir($script);
2068
    my $base = StripDir($script);
-
 
2069
    unless ($no_copy) {
2069
    CopyFile( $script, $tdir ) unless $no_copy;
2070
        CopyFile( $script, $tdir );
-
 
2071
        SetFilePerms('a+rx', catfile($tdir,$base));
-
 
2072
    }
2070
 
2073
 
2071
    my $link;
2074
    my $link;
2072
    my $linkPath = $sk100 ? "/etc/init.d/init.vix.d/" : "/etc/init.d/";
2075
    my $linkPath = $sk100 ? "/etc/init.d/init.vix.d/" : "/etc/init.d/";
2073
    $linkPath = catdir($basedir, $linkPath) . '/';
2076
    $linkPath = catdir($basedir, $linkPath) . '/';
2074
    Verbose("InitScript: ", $base, $tdir, $linkPath);
2077
    Verbose("InitScript: ", $base, $tdir, $linkPath);
Line 2111... Line 2114...
2111
            Error ("Failed to create Service file in $rcLocal, $!");
2114
            Error ("Failed to create Service file in $rcLocal, $!");
2112
        }
2115
        }
2113
        print $fh "#!/bin/sh\n# $base service file\n\n";
2116
        print $fh "#!/bin/sh\n# $base service file\n\n";
2114
        print $fh "start() {\n    [ -e /etc/init.d/init.vix.d/$base ] && /etc/init.d/init.vix.d/$base start\n}\n";
2117
        print $fh "start() {\n    [ -e /etc/init.d/init.vix.d/$base ] && /etc/init.d/init.vix.d/$base start\n}\n";
2115
        print $fh "stop() {\n    [ -e /etc/init.d/init.vix.d/$base ] && /etc/init.d/init.vix.d/$base stop\n}\n";
2118
        print $fh "stop() {\n    [ -e /etc/init.d/init.vix.d/$base ] && /etc/init.d/init.vix.d/$base stop\n}\n";
2116
        print $fh "restart() {\n    [ -e /etc/init.d/init.vix.d/$base ] && /etc/init.d/init.vix.d/$base restart\n}\n";
-
 
2117
        print $fh "suspend() {\n    [ -e /etc/init.d/init.vix.d/$base ] && /etc/init.d/init.vix.d/$base suspend\n}\n";
2119
        print $fh "suspend() {\n    [ -e /etc/init.d/init.vix.d/$base ] && /etc/init.d/init.vix.d/$base suspend\n}\n";
2118
        print $fh "resume() {\n    [ -e /etc/init.d/init.vix.d/$base ] && /etc/init.d/init.vix.d/$base resume\n}\n";
2120
        print $fh "resume() {\n    [ -e /etc/init.d/init.vix.d/$base ] && /etc/init.d/init.vix.d/$base resume\n}\n";
2119
        close $fh;
2121
        close $fh;
2120
        SetFilePerms('a+rx', "/etc/init.d/rc.local.d/$base");
2122
        SetFilePerms('a+rx', $rcLocalFile);
2121
    }
2123
    }
2122
 
2124
 
2123
    return 1;
2125
    return 1;
2124
}
2126
}
2125
 
2127
 
Line 3459... Line 3461...
3459
                $sfile = "$root/$subdir/$sfile";
3461
                $sfile = "$root/$subdir/$sfile";
3460
                $sfile =~ s~//~/~g;
3462
                $sfile =~ s~//~/~g;
3461
                Verbose2("LocateLibFile: $sfile");
3463
                Verbose2("LocateLibFile: $sfile");
3462
                if ( $exact )
3464
                if ( $exact )
3463
                {
3465
                {
3464
                    push @done, $sfile if ( -f $sfile || -l $sfile );
3466
                    UniquePush(\@done, $sfile) if ( -f $sfile || -l $sfile );
3465
                }
3467
                }
3466
                elsif ($num_dll)
3468
                elsif ($num_dll)
3467
                {
3469
                {
3468
                    push @done, glob ( $sfile );
3470
                    push @done, glob ( $sfile );
3469
                }
3471
                }