galeb

Једноставна статичка дистрибуција заснована на musl-у
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување 8048b41887587ece3a9abd2b498d366b343202e2
родитељ 8f8e78e7ed40dc1a2a859305cf1a649a979127f9
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Wed, 27 Jul 2022 20:29:22 +0200

Juggle G_LOGFILE

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
Mfil/rc.d/g_fun.sh | 6+++++-
Mfil/rc.d/rc.inet | 6+++++-
Mfil/rc.d/rc.init | 6++----
измењених датотека: 3, додавања: 12(+), брисања: 6(-)

diff --git a/fil/rc.d/g_fun.sh b/fil/rc.d/g_fun.sh @@ -14,7 +14,11 @@ white=$(printf '\033[97m') bgyellow=$(printf '\033[103m') bgwhite=$(printf '\033[107m') -G_LOGFILE='' +if [ -n "${RCINIT}" ]; then + G_LOGFILE=/tmp/boot.log +else + G_LOGFILE=/dev/null +fi msg() { diff --git a/fil/rc.d/rc.inet b/fil/rc.d/rc.inet @@ -1,7 +1,11 @@ #!/bin/sh . /etc/rc.conf -. /lib/g_fun.sh +RCINIT=1 . /lib/g_fun.sh + +if [ ! -e "${G_LOGFILE}" ]; then + G_LOGFILE=/dev/null +fi msg info "Bringing up lo interface" ip addr add 127.0.0.1/8 dev lo broadcast + scope host 2>>${G_LOGFILE} diff --git a/fil/rc.d/rc.init b/fil/rc.d/rc.init @@ -3,7 +3,7 @@ umask 022 . /etc/rc.conf -. /lib/g_fun.sh +RCINIT=1 . /lib/g_fun.sh PATH=/local/bin:/bin:/sucks/bin export PATH @@ -24,9 +24,7 @@ mkdir -p /dev/pts mount -n -t devpts -o nosuid,noexec,noatime,gid=5,mode=0620 devpts /dev/pts mount -n -t tmpfs -o nosuid,nodev,noatime,mode=0755 run /var/run -printf "%s: /tmp/boot.log created on %s\n" $0 "$(date)" >/tmp/boot.log -G_LOGFILE=/tmp/boot.log -export G_LOGFILE +printf "%s: %s created on %s\n" $0 "${GOOTLOG}" "$(date)" >/tmp/boot.log if grep -q verbose /proc/cmdline >/dev/null 2>>${G_LOGFILE}; then dmesg -n 8 2>>${G_LOGFILE}