Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Dec 2005 14:00:00 -0500
From:      Josh Endries <josh@endries.org>
To:        =?ISO-8859-1?Q?Erik_N=F8rgaard?= <norgaard@locolomo.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Adding lines to /etc/rc.conf during sysinstall wihout	being	"REMOVED"
Message-ID:  <43A30EB0.9000802@endries.org>
In-Reply-To: <43A30792.1040208@locolomo.org>
References:  <43A2F7CE.2010603@endries.org> <43A30792.1040208@locolomo.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Erik Nørgaard wrote:
> Josh Endries wrote:
> 
>> Does anyone know the correct way to add lines to rc.conf without
>> sysinstall commenting them out and prepending "REMOVED" to them,
>> during an automated install.cfg routine? Currently I have a pkg I
>> made that adds stuff like ntp.conf and rc.conf, but all the lines in
>> my custom rc.conf are removed after the script finishes.
>>
> could you post your install.cfg?

Here is my install.cfg:

debug=YES
#nonInteractive=YES
#noWarn=YES

disk=ad0
partition=all
bootManager=standard
diskPartitionEditor
#diskPartitionWrite

ad0s1-2=swap 4194304 none
ad0s1-1=ufs 524288 /
ad0s1-3=ufs 19531250 /home 1
ad0s1-4=ufs 2097152 /tmp 1
ad0s1-5=ufs 19531250 /usr 1
ad0s1-6=ufs 0 /var 1
diskLabelEditor
diskLabelCommit

hostname=test
netDev=vr0
nfs=192.168.0.3:/var/export/6.0-RELEASE/
tryDHCP=YES
mediaSetNFS

#nameserver=192.168.0.7

dists=base
distSetCustom

installCommit

package=portupgrade
packageAdd
package=sudo
packageAdd
package=stunnel
packageAdd
package=syslog-ng
packageAdd

command=cp /dist/pkgtools.conf /usr/local/etc
system
command=sed -i '' 's/md5/blf/' /etc/login.conf
system
command=cap_mkdb /etc/login.conf
system
command=pkg_add /dist/packages/All/my_base.tgz
system

shutdown

This is the plist for my_base.tgz (warning, it's my first package
attempt :)):

@name my_base
@cwd /etc
@srcdir /tmp/my_base
ntp.conf
rc.conf
@cwd /usr/local
@srcdir /tmp/my_base
etc/syslog-ng/syslog-ng.conf
etc/stunnel/stunnel.conf
@exec ln /usr/local/etc/rc.d/syslog-ng.sh.sample
/usr/local/etc/rc.d/syslog-ng.sh

/tmp/my_base/etc/rc.conf:

sshd_enable="YES"
sshd_flags="-p 2222"
ntpd_enable="YES"
stunnel_enable="YES"
syslogd_enable="NO"

After sysinstall's "shutdown" and reboot, it comments out these
lines (using "#REMOVED: %s"). Converting them to something like this
in install.cfg didn't help, regardless of quotes:

command=echo sshd_enable="YES" >> /etc/rc.conf
system

Thanks,
Josh
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDow6wV/+PyAj2L+IRAt/xAKCLUjw7cn9CXjyo23aOsVewSQoc5QCgquKL
UCf3w0TzJx115E4f2aCKve0=
=biMR
-----END PGP SIGNATURE-----



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