cvs commit: src/share/examples/diskless clone_root

Dag-Erling Smørgrav des at
Thu Sep 23 12:29:18 PDT 2004

Brooks Davis <brooks at> writes:
> The problem is that currently there is no way to populate /var without a
> minimum of mtree which lives in /usr.  Since /var is supposed to exist
> before we mount /usr there's a dependency problem.  We should be able
> to fix the mtree dependency now that bsdtar is available since we could
> install a pax archive derived from the mtree file.

...or mtree could move to /sbin.

>                                                     We also strongly
> desire the creation of syslog files which currently requires newsyslog.

You can easily implement 'newsyslog -CC' with sh, touch, chown and

while read file arg1 arg2 rest ; do
    touch "${file}"
    case ${arg1} in
        chown "${arg1}" "${file}"
    case ${arg1} in
        chmod "0${arg1}" "${file}"
done </etc/newsyslog.conf

(unfortunately, chown is in /usr/sbin, so you may have to skip that
step, or do the chown later.  touch is in /usr/bin, but see below)

> The requirement for touch might be removable but I haven't really tried
> since the others are more fundamental.

You can easily implement 'touch' with sh and test:

touch() {
    /bin/test -e "$1" || :>"$1"

Dag-Erling Smørgrav - des at

More information about the cvs-src mailing list