summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-03-28 01:27:05 +0000
committerdamien <damien@mandriva.com>2001-03-28 01:27:05 +0000
commit2ae8d65388bcedaef1be1e0cded6e1dfec83b86b (patch)
treeac248aa1db130e17bdee242620de2a1c4da2320b /perl-install/standalone
parent4637b38e9e10b6e4547edaef23db43b33a39a774 (diff)
downloaddrakx-2ae8d65388bcedaef1be1e0cded6e1dfec83b86b.tar
drakx-2ae8d65388bcedaef1be1e0cded6e1dfec83b86b.tar.gz
drakx-2ae8d65388bcedaef1be1e0cded6e1dfec83b86b.tar.bz2
drakx-2ae8d65388bcedaef1be1e0cded6e1dfec83b86b.tar.xz
drakx-2ae8d65388bcedaef1be1e0cded6e1dfec83b86b.zip
embedded mode
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/draksec6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index 1cca5447d..0ee54873c 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -13,6 +13,7 @@ local $_ = join '', @ARGV;
/-h/ and die "usage: draksec [--expert]\n";
$::expert = /-expert/ || cat_("/etc/sysconfig/system") =~ /^CLASS="?expert/m; #"
+$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/;
my $in = vnew interactive('su');
@@ -43,6 +44,8 @@ Security features are at their maximum."),
delete @l{0,1,5} unless $::expert;
delete @help{0,1,5} unless $::expert;
+begin:
+$::isEmbedded and kill USR2, $::CCPID;
if (my $level = $in->ask_from_list('', _("Choose security level") . "\n\n" .
join('', map { "$l{$_}: $help{$_}\n\n" } keys %l),
[ values %l ], $l{$ENV{SECURE_LEVEL}})) {
@@ -55,4 +58,5 @@ if (my $level = $in->ask_from_list('', _("Choose security level") . "\n\n" .
$in->resume;
}
-$in->exit(0);
+!$::isEmbedded ? $in->exit(0) : kill(USR1, $::CCPID);
+goto begin;