summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmdkapplet7
-rwxr-xr-xmdkonline8
-rwxr-xr-xmdkupdate2
3 files changed, 8 insertions, 9 deletions
diff --git a/mdkapplet b/mdkapplet
index 98a36596..a3ed5f9a 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -305,7 +305,12 @@ sub about {
}
sub setAutoStart {
my $state = shift;
- output_p "$ENV{HOME}/.mdkonline",
+ my $file = "$ENV{HOME}/.mdkonline";
+ if (-e $file) {
+ my %s = getVarsInSh($file);
+
+ }
+ output_p $file,
qq(AUTOSTART=$state
);
chmod 0644, "$ENV{HOME}/.mdkonline";
diff --git a/mdkonline b/mdkonline
index 86ec9e26..bb434ae0 100755
--- a/mdkonline
+++ b/mdkonline
@@ -199,6 +199,7 @@ sub checkErrors {
}
sub setEntryWithConf {
my %t = getVarsFromSh($wideconf);
+ $t{MACHINE} ||= chomp_(`hostname`);
foreach (qw(login machine)) { $o->{$_}->get_text or $o->{$_}->set_text($t{uc($_)}) }
}
sub sendConfig {
@@ -411,11 +412,4 @@ MACHINE=$boxname
COUNTRY=$country
LASTCHECK=$d
);
- my $user = $ENV{INITIAL_USER} || $ENV{USER};
- my $confpers = $user eq 'root' ? '/root/.mdkonline' : "/home/$user/.mdkonline";
- my ($uid, $gid) = (getpwnam($user) || $user, getgrnam($user) || $user);
- output_with_perm $confpers, 644,
- qq(AUTOSTART=TRUE
-);
- chown $uid, $gid, $confpers;
}
diff --git a/mdkupdate b/mdkupdate
index 541aa133..15a954d5 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -31,7 +31,7 @@ use lib qw(/usr/lib/libDrakX);
use common;
BEGIN { unshift @::textdomains, 'mdkupdate' }
-my $in = 'interactive'->vnew('su', 'default');
+require_root_capability();
my $logfile = "/var/log/mdkupdate.log";
my $conffile = "/root/.mdkupdate";