[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: Changing default shell for Cron
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2014-04-30 15:40:41
Message-ID: CAK1hOcMgjrKRJXobZu=QzM4k_Go4+pxyp+ioNbQ4h2q2PUdD7Q () mail ! gmail ! com
[Download RAW message or body]
On Mon, Apr 28, 2014 at 7:23 PM, Rob Anderson <rca93@hotmail.co.uk> wrote:
> I have compiled Busybox for Android with a fully working cron. However, when
> I try to run crond/crontab, I get the following output in the log;
>
> "crond: can't execute '/bin/sh' for user root"
>
> Unfortunately, I have tried all the usual suggestions on the internet e.g.
> adding PATH and SHELL to the cron but to no avail (I can get cron working
> perfectly by symlinking /system/bin/sh to /bin/sh but I do not like this
> method). Is it possible to hardcode a different default shell path into the
> Busybox source for cron to execute e.g. the default /system/bin/sh for
> Android? If so, could you please advise whereabouts in the source this
> change needs to be made?
libbb.h:
/* You can change LIBBB_DEFAULT_LOGIN_SHELL, but don't use it,
* use bb_default_login_shell and following defines.
* If you change LIBBB_DEFAULT_LOGIN_SHELL,
* don't forget to change increment constant. */
#define LIBBB_DEFAULT_LOGIN_SHELL "-/bin/sh"
extern const char bb_default_login_shell[] ALIGN1;
/* "/bin/sh" */
#define DEFAULT_SHELL (bb_default_login_shell+1)
/* "sh" */
#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+6)
Meanwhile, I added support for SHELL=prog in crond.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic