Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 2004 21:29:17 +0200
From:      des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        cvs-src@FreeBSD.org
Subject:   Re: cvs commit: src/share/examples/diskless clone_root
Message-ID:  <xzpsm98vl6a.fsf@dwp.des.no>
In-Reply-To: <20040923191538.GG25699@odin.ac.hmc.edu> (Brooks Davis's message of "Thu, 23 Sep 2004 12:15:38 -0700")
References:  <200409231552.i8NFqh1c042744@repoman.freebsd.org> <20040923120543.B72856@xorpc.icir.org> <20040923191538.GG25699@odin.ac.hmc.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Brooks Davis <brooks@one-eyed-alien.net> 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
chmod:

while read file arg1 arg2 rest ; do
    touch "${file}"
    case ${arg1} in
    *:*)
        chown "${arg1}" "${file}"
        arg1=3D"${arg2}"
        ;;
    esac
    case ${arg1} in
    [0-7][0-7][0-7])
        chmod "0${arg1}" "${file}"
        ;;
    esac
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"
}

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpsm98vl6a.fsf>