aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2010-12-09 12:56:11 +0100
committerThomas Bächler <thomas@archlinux.org>2010-12-13 22:31:08 +0100
commitb1f25405aeb7baff194aac4473c8c6692c3d8bea (patch)
tree93bc340f9d9d63cff5e4730daa92ed2ba7e6760e /rc.sysinit
parent04db84c87ebb2ef448c2e67e4697fd68ba1be975 (diff)
downloadinitscripts-b1f25405aeb7baff194aac4473c8c6692c3d8bea.tar.xz
PATH: export a standard path in rc.sysinit
This is usefull for udev and other processes that do not get a PATH set by /etc/profile. The particular choice of paths to export was taken from systemd, the rationale being that systemd is designed to be compatible with all the major distros and in particular with udev. The paths are also the same as set as standard in /etc/profile With this patch we handle the PATH variable similarly to what systemd does (in their case the variable is set in init). Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit3
1 files changed, 3 insertions, 0 deletions
diff --git a/rc.sysinit b/rc.sysinit
index b1dfa66..c719abf 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -16,6 +16,9 @@ printsep
run_hook sysinit_start
+# export standard PATH (will be overridden later when /etc/profile is sourced, but is usefull for UDev)
+export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+
# mount /proc, /sys and our RAM /dev
/bin/mountpoint -q /proc || /bin/mount -n -t proc proc /proc -o nosuid,noexec,nodev
/bin/mountpoint -q /sys || /bin/mount -n -t sysfs sysfs /sys -o nosuid,noexec,nodev