On 2/8/11 3:29 AM, Vasilis Tsiligiannis wrote:
On Tuesday 08 February 2011 03:51:21 Mark Mentovai wrote:
I wonder why this didn’t just use ~root. There’s no way to disable
tilde expansion in Busybox ash, so ~root should always be available.
It would certainly be more elegant and reliable than this shell
function, unless there’s a fear that the root user might not be named
root. Given that there’s probably a guarantee that this script is
executed as root (whatever its name may be), ~/ ought to be safe.
It's not so safe, as user home dir can be overriden in a shell by setting
the "$HOME" environment variable.


So have:

HOME=

in the script.



_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to