Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] crontab: can't change directory to '/var/spool/cron/crontabs': No such file or directory
Date: Thu, 28 Jan 2016 23:02:52 +0100	[thread overview]
Message-ID: <87twlxmkfn.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <1454000577.4304.27.camel@synopsys.com> (Alexey Brodkin's message of "Thu, 28 Jan 2016 17:02:57 +0000")

>>>>> "Alexey" == Alexey Brodkin <Alexey.Brodkin@synopsys.com> writes:

 > Hello,
 > Just noticed this:
 ------------------> 8-------------------
 > # crontab -e
 > crontab: can't change directory to '/var/spool/cron/crontabs': No such file or directory
 ------------------> 8-------------------

 > Obvious solution is:
 ------------------> 8-------------------
 > # mkdir -p /var/spool/cron/crontabs
 ------------------> 8-------------------

 > But the question is if we want that to be done automatically and if
 > we do want how (read "where") to do it properly?

Yes, the problem is also how should this work together with a readonly
rootfs? Our default skeleton has /var/spool as a symlink to /tmp/, so we
cannot add /var/spool/cron/crontabs at build time (unless we change the
skeleton).

What I have done in the past is simply to do it in an init script,
E.G. something like:


# /var/spool is link to /tmp => crontabs are not persistent over boot
mkdir -p /var/spool/cron/crontabs
cp /root/crontab /var/spool/cron/crontabs/root
start-stop-daemon -S -q -p /var/run/crond.pid --exec /usr/sbin/crond -- -l 9

But that isn't very generic.

-- 
Venlig hilsen,
Peter Korsgaard 

  reply	other threads:[~2016-01-28 22:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28 17:02 [Buildroot] crontab: can't change directory to '/var/spool/cron/crontabs': No such file or directory Alexey Brodkin
2016-01-28 22:02 ` Peter Korsgaard [this message]
2016-01-29 10:13   ` Luca Ceresoli
2016-02-01 18:17   ` Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87twlxmkfn.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox