tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

rc.d environment inheritance



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I recently wasted some time over this, so either the documentation needs
to be improved, or some parity needs to happen with rc.d script
behaviour at boot and at the console.

Take this snippet from /etc/rc

export HOME=/
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
umask 022

The default environment for root has a different HOME and PATH which led
me on a merry chase working out why it worked fine on the console but
not at boot - basically I was running a daemon under the impression that
 it would pickup paths for /usr/pkg/sbin and /usr/pkg/bin.

I think a comment should be added to /etc/rc.conf about this along with
the above being moved to /etc/defaults/rc.conf. Hopefully then, rc.d
scripts should be similar behavior between boot and console.

Something else for discussion should the default path be changed to
mirror the default path for root? This would allow a daemon included in
base to find an optionally installed program from pkgsrc by path. The
daemon in question is dhcpcd, the program in question is openresolv. I
don't really want to go about coding dhcpcd to try and search every
package path around either :)

Thanks

Roy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJJvWflAAoJEFl/l+qa1FVJ/Q0H/22BPOYSlYbpqEYnuqWbmssr
a1k4k4qEghMJfN8zU/3+y7qWUASO9hebZScIbvHVoxLfNNvjKTpie5k3rfpxD7wi
c93zA10Cxsej8j5hb3SjpItdLXxYf+aqZqILsFnABH7DHdG/rC993bMYINqYZuIa
bFpJkodGRlPTsCt8n24a4PZZky9Y0HE6tQjE3F/x0VCOLKtAC8WvW4I7xZvi9uds
VsSjjdAaVdID38UqIKuIPTmgQYJlGpSoLOwMvWj6QNYEsq3YP9wyKecS3rMja+m9
J+Doi4OqncS4NoINdYgMqYB1prhd6MuQ5qmrhSYoNui9to4varHoVJKJCqX0f2I=
=lASN
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index | Old Index