Hello community, here is the log from the commit of package aaa_base for openSUSE:Factory checked in at Mon Aug 22 09:46:33 CEST 2011.
-------- --- aaa_base/aaa_base.changes 2011-08-02 15:41:39.000000000 +0200 +++ /mounts/work_src_done/STABLE/aaa_base/aaa_base.changes 2011-08-19 16:12:40.000000000 +0200 @@ -1,0 +2,11 @@ +Fri Aug 19 14:10:19 UTC 2011 - fcro...@suse.com + +- check if systemd is running and notify user + +------------------------------------------------------------------- +Thu Aug 18 14:28:07 UTC 2011 - r...@suse.com + +- fix last change +- update FSF address in skeleton file + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ aaa_base.spec ++++++ --- /var/tmp/diff_new_pack.LtRpiz/_old 2011-08-22 09:45:02.000000000 +0200 +++ /var/tmp/diff_new_pack.LtRpiz/_new 2011-08-22 09:45:02.000000000 +0200 @@ -21,7 +21,7 @@ Name: aaa_base Version: 12.1 -Release: 101 +Release: 103 License: GPLv2+ Group: System/Fhs Url: http://gitorious.org/opensuse/aaa_base ++++++ aaa_base.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aaa_base/files/etc/init.d/skeleton new/aaa_base/files/etc/init.d/skeleton --- old/aaa_base/files/etc/init.d/skeleton 2011-08-02 15:40:30.000000000 +0200 +++ new/aaa_base/files/etc/init.d/skeleton 2011-08-19 16:09:44.000000000 +0200 @@ -12,11 +12,10 @@ # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. -# +# # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, -# USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # /etc/init.d/FOO # and its symbolic link diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aaa_base/files/etc/init.d/skeleton.compat new/aaa_base/files/etc/init.d/skeleton.compat --- old/aaa_base/files/etc/init.d/skeleton.compat 2011-08-02 15:40:30.000000000 +0200 +++ new/aaa_base/files/etc/init.d/skeleton.compat 2011-08-19 16:09:44.000000000 +0200 @@ -15,8 +15,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, -# USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # /etc/init.d/FOO # LSB compatible service control script; see http://www.linuxbase.org/spec/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aaa_base/files/sbin/chkconfig new/aaa_base/files/sbin/chkconfig --- old/aaa_base/files/sbin/chkconfig 2011-08-02 15:40:30.000000000 +0200 +++ new/aaa_base/files/sbin/chkconfig 2011-08-19 16:09:44.000000000 +0200 @@ -7,6 +7,8 @@ my $initdir = '/etc/init.d'; my $inetddir = '/etc/inetd.d'; my $xinetddir = '/etc/xinetd.d'; +my $systemd_service_path = '/lib/systemd/system'; +my $systemd_binary_path = '/bin/systemd'; my %to_d = ( '0' => 'rc0.d', '1' => 'rc1.d', '2' => 'rc2.d', '3' => 'rc3.d', @@ -448,6 +450,58 @@ return $rl; } +# +# check if systemd is active +# +sub is_systemd_active { + my $cgroup_dev; + my $systemd_dev; + my $st; + + use File::stat; + $st = lstat("/sys/fs/cgroup") or return; + $cgroup_dev = $st->dev; + $st = lstat("/sys/fs/cgroup/systemd") or return; + $systemd_dev = $st->dev; + return if ($cgroup_dev == $systemd_dev); + -e $systemd_binary_path or return; + return 1; +} + +sub is_overriden_by_systemd { + my $service = shift; + my $root = shift; + return -e "$root/$systemd_service_path/$service.service"; +} + +sub forward_to_systemd { + my $service = shift; + my $verb = shift; + my $root = shift; + + return unless ($root ne "/") or ($root eq "/") and (is_systemd_active()); + + if (is_overriden_by_systemd ($service,$root)) { + my $unit = "$service.service"; + my $ret; + my $root_option; + print STDERR "Note: Forwarding request to 'systemctl $verb $unit'.\n"; + $root_option = "--root $root" unless $root eq "/" ; + $ret = system ("systemctl $root_option $verb $unit"); + if ($verb eq "is-enabled") { + print "$service "; + if ($ret == 0) { + print "on\n"; + } else { + print "off\n"; + } + } + return 1; + } + return; +} + + ################################################################## # main program @@ -582,6 +636,7 @@ next unless defined $current{$s}; my $r = readable($s, $current{$s}); next unless defined $r; + next if forward_to_systemd($s, "is-enabled", $root); printf $fh "%-*s %s\n", $maxlen, $s, $r; } exit 0 unless $mode eq 'e'; @@ -699,6 +754,15 @@ } if ($mode eq 'l') { my $usecolor = -t STDOUT; + if (-e $systemd_service_path && -e $systemd_binary_path) { + print STDERR <<EOF; + +Note: This output shows SysV services only and does not include native +systemd services. SysV configuration data might be overridden by native +systemd configuration. + +EOF + } for $s (@services) { if (!$known_rc{$s}) { print STDERR "$s: unknown service\n" unless $known_all{$s}; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org