5

After a clean install of Fedora 17 and distcc-server, I did a service distccd start, which completed successfully.

man service indicates that it would merely be running the distccd script at /etc/init.d/distccd, but that file doesn't exist. chkconfig also doesn't appear to know about distccd, which is confirmed by there being no related files in /etc/rc[0-6].d. There does exist a file /etc/sysconfig/distccd that contains run options for the distcc daemon, but I can't seem to find anything linking service to /etc/sysconfig anyway.

How does service know what to do when I type service distccd start?

Also, I have learned that Fedora 17 may redirect service to systemd/systemctl. Even if that is the case, I still don't find any distccd related files in /etc/systemd/{system,user}.

Cory Klein
  • 18,391
  • 26
  • 81
  • 93

2 Answers2

3

/etc/systemd is for user defined services. The default location for system defined services is /lib/systemd/system/. You can overwrite system defined services in /etc/systemd.

For more information about systemd either have a look at the fedora wiki page for systemd or have a look at the systemd documentation

Ulrich Dangel
  • 25,079
  • 3
  • 80
  • 80
1

AFAIK, service relies on an init script being present in /etc/init.d.

distccd may not have come packaged with an init script. Try the following to start the service as a daemon:

distccd --daemon

If that works, you can create your own script at /etc/init.d/distccd that fires the above command, then you'll be able to treat it like a system service with service distccd start. Use /etc/init.d/skeleton as a template.

Banjer
  • 2,870
  • 6
  • 27
  • 35
  • I have updated the question title to better reflect this, but I am seeing that distccd is actually being started with a `service distccd start`, even though there is no file `/etc/init.d/distccd`. So I am asking how that is happening, not how to make it happen. – Cory Klein Jun 28 '12 at 17:57
  • strange. try an strace on it and see if you get an idea of where service is looking. `strace -o test.txt service distccd start` – Banjer Jun 28 '12 at 19:37
  • @Banjer fedora uses systemd in the latest version, so it probably uses a definition in `/lib/systemd/` – Ulrich Dangel Jun 28 '12 at 19:48