svn commit: r282672 - head/etc/rc.d

Jilles Tjoelker jilles at stack.nl
Mon May 11 22:12:14 UTC 2015


On Sun, May 10, 2015 at 11:32:27PM +0200, Oliver Pinter wrote:
> > tr is in /usr/bin so this breaks systems with a separate /usr.
> > Perhaps you could use dd with conv=lcase instead?

> Then these are affected too::

> root at robot rc.d# grep -r -E '(awk| tr )' *
> ftp-proxy:                      ps_pid=`ps ax -o pid= -o command= |
> grep $cmd_string | grep -e "$flag_string" | grep -v grep | awk '{
> print $1 }'`
> growfs: rootdev=$(df / | tail -n 1 | awk '{ sub("/dev/", "", $1); print $1 }')
> growfs:         rawdev=$(glabel status | awk '$1 == "'"$rootdev"'" {
> print $3 }')
> growfs: sysctl -b kern.geom.conftxt | awk '
> jail:           _j=$(echo $_j | tr /. _)
> jail:   _j=$(echo $1 | tr /. _)
> jail:                   _j=$(echo $_j | tr /. _)
> jail:                   _j=$(echo $_j | tr /. _)
> jail:           _j=$(echo $_j | tr /. _)
> motd:   awk '{if (NR == 1) {if ($1 == "FreeBSD") {next} else {print
> "\n"$0}} else {print}}' < /etc/motd >> ${T}
> ntpdate:                ntpdate_hosts=`awk '
> power_profile:  awk '{ split($0, a, "[/ ]"); print a[1] }' -) 2> /dev/null`"
> power_profile:  awk '{ split($0, a, "[/ ]"); print a[length(a) - 1] }'
> -) 2> /dev/null`"
> sshd:   local ALG="$(echo $alg | tr a-z A-Z)"
> syscons:                for i in `kldstat | awk '$5 ~ "_saver\.ko$" {
> print $5 }'`; do
> syslogd:        for _s in `cat $sockfile | tr '\n' ' '` ; do
> virecover:                              recfile=`awk
> '/^X-vi-recover-path:/{print $2}' < "${i}"`

> The awk is located in /usr/bin/awk too, and for e.g. the growfs should
> running in the very first steps...

Except for growfs and power_profile, these already REQUIRE
mountcritremote or FILESYSTEMS (directly or indirectly), or critically
depend on software in /usr like /usr/sbin/ftp-proxy or /usr/sbin/jail.

The problem with growfs was explained elsewhere in the thread.

Although power_profile appears to have an appropriate REQUIRE line, it
is in fact started via devd, which happens fairly early.

-- 
Jilles Tjoelker


More information about the svn-src-all mailing list