On Wed, 2011-11-09 at 11:01 +0000, "Jóhann B. Guðmundsson" wrote: > > Now taking a quick look at the autofs service which I assume you are > referring too I'm not seeing anykind of massive rewrite in order for the > daemon ( which generally is an exception that a rule ) to work in > systemd unit so from a quick and convertion on top of my head while > writing this, here's a unit file which you can start as your base point > to work on. > > ### autofs.service ### > > [Unit] > Description=Automounts filesystems on demand > Requires=ypbind.service What happens if ypbind is not installed or is not enabled? The problem with this has always been people that use NIS need it to be started before automount but using it is not a requirement since other map sources may be used (and commonly are nowadays) like files or ldap. > After=network.target ypbind.service So maybe this is all that's needed, but how is the conditional ypbind dependency handled? > > [Service] > Type=forking Right, but the documentation in a previous post talked about a requirement to run in the foreground and log to stdout ..... > PIDFile=/run/autofs.pid > EnvironmentFile=-/etc/sysconfig/autofs I don't think I need this either and sourcing it in the exiting init file is redundant. The daemon will read the configuration file itself. > ExecStart=/usr/sbin/automount ${OPTIONS} --pid-file /run/autofs.pid Oh, except for the daemon start options, mmm, maybe it's time to split the configuration into daemon configuration and init configuration. Is there a better way to do this just for the daemon start options that is easy for users to change? > > [Install] > WantedBy=multi-user.target > > The load module and check section has been drop since loading modules in > systemd unit is frowned upon and rightly so since kmods these days can > be autoloaded on use and those that cant should drop an conf file for > that module load into /etc/modules-load.d/ directory. > > If yours cant be autoloaded on use here's a conf file that loads that > module. > > ### autofs.conf ### > > # Load autofs module at boot > autofs4 Yes, I really need to get around to renaming that module to autofs in kernel so it can be autoloaded (but that could cause considerable disruption, it's not straight forward to do in a backward compatible way). Adding a module load file upstream isn't too appealing since the module needs to be renamed, maybe this will be Fedora specific. Lennart, anything to add about or problems you see with this unit definition? Ian -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel