From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <8651978ecfd9dbac02422222459d25ed@voidness.de> To: 9fans@cse.psu.edu Subject: Re: [9fans] cron and lib/profile From: Heiko Dudzus Date: Tue, 27 Mar 2007 19:21:30 +0200 In-Reply-To: <627937.472.qm@web56201.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 336dc92e-ead2-11e9-9d60-3106f5b1d025 smurfasmurf wrote: > Cron (w. host=local) does not seem to read $home/lib/profile, so all > the binds there are missing. Should it not behave as if the user logged > in and typed the command manually? With host=local, the command runs in a namespace as in /lib/namespace. If you need the bindings made in your lib/profile you can use the explicit name of the CPU server as hostname. In the latter case, rx(1) and rexexec(8) are used. Rexexec does: execl("/bin/rc", "rc", "-lc", buf, nil); to run the commands in it. (The -l flag causes rc to read lib/profile.) whereas, if host is 'local', cron does: execl("/bin/rc", "rc", "-c", buf, nil); The I can't tell if the difference in behaviour is intended. But you can work around it that way. Heiko