[systemd-devel] RFC: creating a set of systemd RPM macros across distributions ?

Frederic Crozat fcrozat at suse.com
Wed Jul 6 02:00:27 PDT 2011


Le mardi 05 juillet 2011 à 15:06 -0400, Bill Nottingham a écrit :
> Frederic Crozat (fcrozat at suse.com) said: 
> > %service_migrate_to_systemd(l)
> > {-l:LEVEL="-l $1 ; shift }
> > for service in %{?*} ; do \
> > if /sbin/chkconfig $LEVEL $service ; then
> >      /bin/systemctl --no-reload enable `echo $service | sed -e
> > 's/\.service//g'` >/dev/null 2>&1 || :
> > fi
> 
> If you've got a version of chkconfig that forwards to systemd,
> the level argument isn't optional here ; it's required so that it
> actually checks the sysv service.

we have such version but it is a perl wrapper over insserv. And after
checking, the syntax isn't exactly the same :(

Moreover, I used an old version of
https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd as a
basis and it seems it has evolved a little, with a python script to
handle the work :
http://pkgs.fedoraproject.org/gitweb/?p=systemd.git;a=blob;f=systemd-sysv-convert;h=1c3f1a98ebe7b829b2311346a660dcd07454275c;hb=HEAD

Do you think we should merge this script in systemd upstream ? Or maybe
use the name in the macro ?

-- 
Frederic Crozat <fcrozat at suse.com>
SUSE



More information about the systemd-devel mailing list