On Tuesday 04 May 2010 12:17:41 Jacek Konieczny wrote: > What do you think? Should I try to prepare a proof-of-concept > implementation?
i describe ubuntu like implementation that i had in first mind to do: 1. some packages have been migrated to upstart, having /etc/init/<service>.conf file 2. those packages initscript is symlinked: to /etc/rc.d/init.d<service> -> /lib/init/upstart-job 3. upstart-job suggests to use 'service <service> to start if invoked directly via /etc/rc.d/init.d 4. /sbin/service, sees if invoked service jas /etc/init/<service>.conf and invokes via upstart, otherwise fallbacks to sysvninit mode upstart-job is included in upstart package, /sbin/service diff in attachment. however this assumes you already have upstart in target, i.e you preserve invoking old way, but require upstart being present. and this does not handle chkconfig integration due the symlink, i.e booting without upstart sequence is unknown. i've also packaged two packages from ubuntu to pld: mountall and ureadahead > P.S. Does anybody read those 'long' posts I send to pld-devel-en? ;) i would had answered bacula one, if i had chance to test bacula 5.0 -- glen
--- service 2010-04-21 23:22:56.221265599 +0300 +++ /sbin/service 2010-04-21 23:24:13.564399085 +0300 @@ -95,6 +95,21 @@ esac done +if [ -r /etc/init/${SERVICE}.conf ]; then + # Upstart configuration exists for this job + case "${ACTION}" in + start|stop|restart|status|reload) + # Action is a valid upstart action + exec ${ACTION} ${SERVICE} ${OPTIONS} + ;; + force-reload) + # Upstart just uses reload for force-reload + exec reload ${SERVICE} ${OPTIONS} + ;; + esac +fi + +# Otherwise, use the traditional sysvinit if [ -x "${SERVICEDIR}/${SERVICE}" ]; then exec env -i LANG=$LANG PATH=$PATH TERM=$TERM "${SERVICEDIR}/${SERVICE}" ${ACTION} ${OPTIONS} else
_______________________________________________ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en