Hello community, here is the log from the commit of package insserv-compat for openSUSE:Factory checked in at 2013-07-05 15:04:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/insserv-compat (Old) and /work/SRC/openSUSE:Factory/.insserv-compat.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "insserv-compat" Changes: -------- --- /work/SRC/openSUSE:Factory/insserv-compat/insserv-compat.changes 2013-01-30 09:30:02.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.insserv-compat.new/insserv-compat.changes 2013-07-05 15:04:35.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Jul 5 07:33:53 UTC 2013 - [email protected] + +- print warning if a sysv init script is masked by a systemd service + (bnc#798510, bnc#804273) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ insserv.pl ++++++ --- /var/tmp/diff_new_pack.RtkdWe/_old 2013-07-05 15:04:36.000000000 +0200 +++ /var/tmp/diff_new_pack.RtkdWe/_new 2013-07-05 15:04:36.000000000 +0200 @@ -127,9 +127,31 @@ } } + +sub get_systemd_service($) +{ + my $name = shift; + for my $file ("/usr/lib/systemd/system/$name.service", + "/run/systemd/system/$name.service", + "/etc/systemd/system/$name.service") { + return $file if -e $file; + } + return undef; +} +sub warn_systemd_masked($$) +{ + return unless -t STDERR; + my $name = shift; + my $state = shift; + my $file = get_systemd_service($name); + return unless $file; + print STDERR "Warning: $init_d/$name is masked by $file.\nTry 'chkconfig $name $state' instead\n"; +} + sub disable($) { my $name = shift; + warn_systemd_masked($name, "off"); for my $link (@{getlinks($name)||[]}) { do_unlink($link); } @@ -154,6 +176,7 @@ $name =~ s/,(?:start|stop)=.*//; my $links = getlinks($name); return 0 if $links; # already enabled + warn_systemd_masked($name, "on"); my $h = parse($name); return unless defined $h; createlinks('S', $name, $h->{'default-start'} || '2 3 5'); -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
