[systemd-devel] systemd service for kinit

Tomasz Torcz tomek at pipebreaker.pl
Wed Sep 17 12:37:01 PDT 2014


On Wed, Sep 17, 2014 at 08:53:30PM +0200, Günther J. Niederwimmer wrote:
> Am Mittwoch, 17. September 2014, 21:01:09 schrieb Andrei Borzenkov:
> > В Wed, 17 Sep 2014 18:46:45 +0200
> > 
> > Günther J. Niederwimmer <gjn at gjn.priv.at> пишет:
> > > Hello,
> > > 
> > > Am Mittwoch, 17. September 2014, 15:35:44 schrieb Andrei Borzenkov:
> > > > On Wed, Sep 17, 2014 at 2:44 PM, Günther J. <gjn at gjn.priv.at> wrote:
> > > > > Hello,
> > > > > 
> > > > > I have a problem with kinit (krb5)
> > > > > before on my old system this works with a cron file
> > > > > 
> > > > > @reboot root /usr/bin/sleep 120 && /usr/bin/kinit -k
> > > > > host/.............
> > > > > 
> > > > > now with systemd I can't say why, the extra characters don't work
> > > > > "@reboot"
> > > > 
> > > > Could you explain what do you mean? One of
> > > > 
> > > > - "@reboot" is not accepted by cron
> > > 
> > > I mean this is the problem ;)
> > 
> > And why do you think it is caused by systemd?
> 
> with my older system without systemd all works and I can't found in the cron 
> doc that any change are make.
> 
> But this is not my question.
> 
> Is it possible to create a kinit.service that works on the same way?

  You seem to be mixing cron problems with systemd.  Anyway, you may approximate
wanted behaviour by creating kinit.timer with OnBootSec=2m  (or OnStartupSec=,
check man systemd.timer) and kinit.service, type oneshot, and ExecStart with
your kinit invocation.

  Please note, this may work 99% but it's not proper solution.  You should
tie services depending on your kinit with proper Requires= and After=.

-- 
Tomasz Torcz            There exists no separation between gods and men:
xmpp: zdzichubg at chrome.pl   one blends softly casual into the other.



More information about the systemd-devel mailing list