All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Trouble with cron / crontab
Date: Fri, 20 Mar 2015 13:31:37 +0100	[thread overview]
Message-ID: <20150320133137.05ece4e7@free-electrons.com> (raw)
In-Reply-To: <DB3PR04MB1086BDBABB62A2E19D61F0CEA0E0@DB3PR04MB108.eurprd04.prod.outlook.com>

Hello,

On Fri, 20 Mar 2015 11:20:36 +0000, Fabrice Mousset | GEOCEPT GmbH
wrote:

> I am facing a strange issue with Buildroot 2015.02. I am using cron/crontab from Busybox but can't start/define any cronjob because /var/spool/cron/crontabs didn't exist on my rootfs.
> On my rootfs there is no /var/spool/cron but this exist on output/target.
> 
> I haven't found anything in documentation about cron...
> Is there something I have missed?

In the skeleton:

$ ls -l system/skeleton/var/
total 4
lrwxrwxrwx 1 thomas thomas    6 mars   8  2014 cache -> ../tmp
drwxr-xr-x 2 thomas thomas 4096 mars   5 15:40 lib
lrwxrwxrwx 1 thomas thomas    6 mars   8  2014 lock -> ../tmp
lrwxrwxrwx 1 thomas thomas    6 mars   8  2014 log -> ../tmp
lrwxrwxrwx 1 thomas thomas    7 mars  17 15:28 run -> ../run/
lrwxrwxrwx 1 thomas thomas    6 mars   8  2014 spool -> ../tmp
lrwxrwxrwx 1 thomas thomas    6 mars   8  2014 tmp -> ../tmp

So /var/spool is a symbolic link to /tmp, which means it resides on
tmpfs. You could change the cron init script to create /var/spool/cron
at boot time, but I guess it wouldn't be very useful as you would lose
your cronjob definitions at each reboot I believe.

So maybe we need to change the default Busybox configuration to store
the crontab somewhere or re-think /var/spool as being in tmpfs.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2015-03-20 12:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 11:20 [Buildroot] Trouble with cron / crontab Fabrice Mousset | GEOCEPT GmbH
2015-03-20 12:31 ` Thomas Petazzoni [this message]
2015-03-20 13:02   ` Fabrice Mousset | GEOCEPT GmbH

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=20150320133137.05ece4e7@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.