Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jan 2005 15:39:53 -0500
From:      "David Robillard" <david.robillard@notarius.com>
To:        <freebsd-questions@freebsd.org>
Subject:   Unattended 5.3 install post-configuration problem.
Message-ID:  <7E329942919D504787E9424F728893F8013E0440@EMMA.notarius.lan>

next in thread | raw e-mail | index | archive | help
Hello everyone,

I've setup an unattended automatic FreeBSD-5.3 install server. Clients
boot via PXE and receive the OS in around 15 minutes using a
sysinstall(8) script.

I need to perfom post-install configuration, so I wrote a
post_install.sh shell script which is called at the end of the
sysinstall(8) script.

My problem is that I can't get my post-install script to modify
rc.conf(5) because sysinstall(8) re-writes the file and removes=20
my configurations (all lines from rc.conf(5) starts with `#REMOVE' ).

The sysinstall(8) man page only says:

This utility may edit the contents of /etc/rc.conf, /etc/hosts, and
     /etc/resolv.conf as necessary to reflect changes in the network
	configuration.

How can I prevent or circumvent this "feature" of sysinstall???

Any help would be really appreciated.

Here are the files:

# From sysinstall(8) install.cfg:
#
command=3D/stand/post_install.sh
system


# From /stand/post_install.sh
#
cat <<- "END" > /tmp/a
        # rc.conf
        #
        # Please make all changes to this file, not to
/etc/defaults/rc.conf.
        # This file now contains just the overrides from
/etc/defaults/rc.conf.
        #
        # David Robillard, December 13th, 2004
       =20
        check_quotas=3D"YES"              # Check quotas.
        hostname=3D"hostname.domain.com"  # Hostname.
        ifconfig_bge0=3D"inet 192.168.1.1 netmask 255.255.255.0"  #
Configure NIC bge0.
        keyrate=3D"normal"                # Set normal keyboard
repeatrate.
        nisdomainname=3D"NO"              # We don't run NIS.
        saver=3D"blank"                   # Blank screen when idle.
        scrnmap=3D"NO"                    # Screen map in
/usr/share/syscons/scrnmaps/*
        sshd_enable=3D"YES"               # Start sshd(8).
        usbd_enable=3D"YES"               # Start usbd(8).
        tcp_drop_synfin=3D"YES"           # Prevent OS finger printing.
        sendmail_enable=3D"NO"            # Bind sendmail(8) to locahost
only.
        syslogd_enable=3D"YES"            # Start syslogd(8).
        syslogd_flags=3D"-ss"             # Receive syslogd(8) from =
local
machine only.
        inetd_enable=3D"NO"               # Don't run inetd(8).
        icmp_drop_redirect=3D"YES"        # Drop ICMP redirect.
        icmp_log_redirect=3D"YES"         # Log dropped ICMP redirect.
        clear_tmp_enable=3D"YES"          # Clear /tmp at startup.
        update_motd=3D"NO"                # Don't update motd(5) at
startup.
       =20
        # EOF
END

mv /tmp/a /root/rc.conf
cp /root/rc.conf /etc/rc.conf



Cheers,

David

--
David Robillard
UNIX systems administrator
david.robillard@notarius.com
+1 514 966 0122



--
David Robillard
UNIX systems administrator
david.robillard@notarius.com
+1 514 966 0122



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