On Sat, 10 Dec 2005 01:34 am, Tarasov Alexey wrote:> Hello!
>
> I'm trying to make full automatical FreeBSD installation. I have the
>
> following lines in my install.cfg:
> > command="echo sshd_enable="YES" >>
/etc/rc.conf"
> > system
> > command="echo 'pass' | /usr/sbin/pw useradd -u user -h 0
-G wheel"
> > system
>
> But during installation I get some error messages:
> > DEBUG: dispatch: calling resword 'system'
> > echo sshd_enable=YES >> /etc/rc.conf: not found
>
> I am using FreeBSD 6.0-RELEASE.
Yep, something changed around 4.x in sysinstall where rc.conf is not
created until near when it finishes. If you write to rc.conf during an
scripted sysinstall, then it will be over written. You can write your
stuff to /etc/rc.conf.local. It gets sourced in /etc/defaults/rc.conf.
$ grep rc.conf /etc/defaults/rc.conf
rc_conf_files="/etc/rc.conf /etc/rc.conf.local"
After boot time, we have a post boot script which merges our stuff from
rc.conf.local into rc.conf, just to keep it clean.
Just to be safe, we quote everything in install.cfg. As in
echo 'sshd_enable=YES' >> /etc/rc.conf.local
Paul.
--
Paul Koch
CTO
Statseeker