diff src/pkg.pl @ 4:fe56b4698cf8

add install-init, and refine pkg.pl.
author Robert McIntyre <rlm@mit.edu>
date Tue, 08 Jan 2013 15:41:29 +0000
parents 9ff0fcf34920
children ab4011ea1463
line wrap: on
line diff
     1.1 --- a/src/pkg.pl	Tue Jan 08 14:42:09 2013 +0000
     1.2 +++ b/src/pkg.pl	Tue Jan 08 15:41:29 2013 +0000
     1.3 @@ -70,11 +70,13 @@
     1.4  @pkg_create_home_cmd = 
     1.5    ("install", "-d", "-g", $pkg_name, "-o", $pkg_name, "-m", "700", $pkg_home);
     1.6  
     1.7 -sub execute{print "@_\n"; system(@_) and die $!;}
     1.8 +sub execute{print "\t@_\n"; system(@_) and die $!;}
     1.9  
    1.10  #determine if the user already exists:
    1.11  `id $pkg_name 2>/dev/null`;
    1.12 -if (!$?){execute(@pkg_switch_cmd); exit 0;}
    1.13 +if (!$?){
    1.14 +  print "Change user.\n";
    1.15 +  execute(@pkg_switch_cmd); exit 0;}
    1.16  
    1.17  print "Creating package group.\n";
    1.18  execute(@pkg_create_group_cmd);