[15:10] Hi guys [15:10] Is there a canonical way to detect if a system is running upstart or inittab? [15:11] I'm updating an rpm to work on CentOS 6 and I want it to also work on CentOS 5.x [17:30] robinbowes: do you want to know whether upstart is running *now*, or whether it's installed as "init"? [17:31] I want to know whether to cat >> /etc/iniitab or cat > /etc/init/some_service.conf [17:31] eh [17:31] To install the service [17:31] I think looking what's installed should be good then [17:31] With SysVinit, it requires adding linwes to /etc/inittab [17:32] Yeah [17:32] What I went with was: [17:32] rpm --queryformat='%%{name}' -qf /sbin/init | grep -q upstart [17:32] if [ $? -eq 0 ] [17:32] ... [17:33] I suppose that's somewhat like using 'dpkg -S /sbin/init' in Debian/Ubuntu? [17:33] OF course, I'll also need to add support for systems :/ [17:33] It means "which package owns the file /sbin/init" [17:34] --queryformat='%{name}' ensures a consistent output format [17:34] The double %% is required since %{...} is expanded in rpm spec files [17:34] you can try to connect to upstart using dbus and such, but that's probably more trouble than you want... === sadmac_food is now known as sadmac