aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-05-16 16:30:49 +0300
committerCem Keylan <cem@ckyln.com>2020-05-16 16:30:49 +0300
commitee593c6930c0b4833880cea309c73437107afe03 (patch)
tree3492fa660b8f5385b5652e879fb209aea90adf28
parent3c37be465a1f30aa040a81714e05034d95cf953a (diff)
downloadinit-ee593c6930c0b4833880cea309c73437107afe03.tar.gz
init: set PATH in rc.lib
-rwxr-xr-xrc.boot3
-rw-r--r--rc.lib1
-rwxr-xr-xrc.shutdown2
3 files changed, 1 insertions, 5 deletions
diff --git a/rc.boot b/rc.boot
index cc31d00..e0d9951 100755
--- a/rc.boot
+++ b/rc.boot
@@ -15,9 +15,6 @@ mnt() {
mount "$@" "$mnt"
}
-# Manually set path
-PATH=$PATH:/usr/bin:/usr/local/bin
-
# Display a pretty welcome message
printf '\033[1;36m-> \033[39mWelcome to \033[35mCarbs %s\033[39m!\033[m\n' "$(uname -s)"
diff --git a/rc.lib b/rc.lib
index 8924aa3..f21fc61 100644
--- a/rc.lib
+++ b/rc.lib
@@ -1,6 +1,7 @@
# rc.lib -- common functions for rc.boot and rc.shutdown
# shellcheck disable=1090
+export PATH=$PATH:/usr/local/bin:/usr/bin
out() { printf '\033[1;36m-> \033[39m%s\033[m\n' "$@" ;}
err() { printf '\033[1;31m!> \033[39m%s\033[m\n' "$@" ;}
diff --git a/rc.shutdown b/rc.shutdown
index 219e775..292284f 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -4,8 +4,6 @@
. /etc/init/rc.conf
. /usr/lib/init/rc.lib
-PATH=$PATH:/usr/local/bin:/usr/bin
-
run_hook pre.shutdown
command -v sv >/dev/null &&