Commit bab77e1d authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add missing os_groupdel function, tickled by new images that were not

"prepared", so it was trying to delete the testbed groups/accounts.
parent d611da42
......@@ -13,6 +13,7 @@ use Exporter;
os_rpminstall_line update_delays
os_routing_enable_forward os_routing_enable_gated
os_routing_add_manual os_routing_del_manual os_homedirdel
os_groupdel
);
# Must come after package declaration!
......@@ -41,6 +42,7 @@ my $USERADD = "/usr/sbin/pw useradd";
my $USERDEL = "/usr/sbin/pw userdel";
my $USERMOD = "/usr/sbin/pw usermod";
my $GROUPADD = "/usr/sbin/pw groupadd";
my $GROUPDEL = "/usr/sbin/pw groupdel";
my $CHPASS = "/usr/bin/chpass -p";
my $MKDB = "/usr/sbin/pwd_mkdb -p";
my $IFCONFIG = "/sbin/ifconfig %s inet %s netmask %s %s %s";
......@@ -160,6 +162,16 @@ sub os_groupadd($$)
return system("$GROUPADD $group -g $gid");
}
#
# Delete an old group
#
sub os_groupdel($)
{
my($group) = @_;
return system("$GROUPDEL $group");
}
#
# Remove a user account.
#
......
......@@ -13,6 +13,7 @@ use Exporter;
os_rpminstall_line enable_ipod
os_routing_enable_forward os_routing_enable_gated
os_routing_add_manual os_routing_del_manual os_homedirdel
os_groupdel
);
# Must come after package declaration!
......@@ -43,6 +44,7 @@ my $USERADD = "/usr/sbin/useradd";
my $USERDEL = "/usr/sbin/userdel";
my $USERMOD = "/usr/sbin/usermod";
my $GROUPADD = "/usr/sbin/groupadd";
my $GROUPDEL = "/usr/sbin/groupdel";
my $IFCONFIG = "/sbin/ifconfig %s inet %s netmask %s";
my $IFC_100MBS = "100baseTx";
my $IFC_10MBS = "10baseT";
......@@ -152,6 +154,16 @@ sub os_groupadd($$)
return system("$GROUPADD -g $gid $group");
}
#
# Delete an old group
#
sub os_groupdel($)
{
my($group) = @_;
return system("$GROUPDEL $group");
}
#
# Remove a user account.
#
......@@ -291,7 +303,10 @@ sub os_routing_enable_gated()
{
my $cmd;
$cmd = "$GATED -f $SETUPDIR/gated_`$SETUPDIR/control_interface`.conf";
# XXX hack to avoid gated dying mysteriously with TCP/611 already in use
$cmd = "sleep 3\n ";
$cmd .= "(ps alxww ; netstat -na) > /tmp/gated.state\n ";
$cmd .= "$GATED -f $SETUPDIR/gated_`$SETUPDIR/control_interface`.conf";
return $cmd;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment