Add my package pre and post install scripts under CVS, fix linking to them.

This commit is contained in:
Alfred Perlstein 2003-06-17 15:34:24 +00:00
parent 3fdb34f5d0
commit 99ea6a90d3
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=17343
3 changed files with 47 additions and 2 deletions
en_US.ISO8859-1/articles/pxe

View file

@ -268,8 +268,10 @@ RELNOTES.TXT compat1x doc packages</screen>
<filename>PLIST</filename> which contains all the files that you wish to
install and be incorporated into your package.</para>
<para>You will also want files called <filename>pre</filename> and
<filename>post</filename> in the directory, these are shell scripts
<para>You will also want files called
<ulink url="pre"><filename>pre</filename></ulink> and
<ulink url="post"><filename>post</filename></ulink>
in the directory, these are shell scripts
that you want to execute before and after your package is
installed.</para>

View file

@ -0,0 +1,36 @@
#!/bin/sh
# $Wintelcom: src/freebsd/pxe/doc/post,v 1.1 2000/07/14 12:42:05 bright Exp $
# $FreeBSD$
echo post-install
set PATH=/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/bin:/usr/bin/X11
export PATH
# do timezone
cp /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
conf="/etc/rc.conf.local"
rm $conf
echo 'sendmail_enable="NO"' >> $conf
echo 'dumpdev="/dev/ad0s1b"' >> $conf
echo 'sshd_enable="YES"' >> $conf
echo 'linux_enable="YES"' >> $conf
# setup IP address and hostname
if=`ifconfig fxp1 inet | grep '[ ]*inet' | sed 's/[ ]*//'`
echo "ifconfig_fxp1=\"${if}\"" >> $conf
name=`echo $if | sed 's/[ ][ ]*/ /g' | cut -f2 -d" " | cut -f4 -d.`
echo "hostname=\"suyy${name}\"" >> $conf
echo "network_interfaces=\"fxp0 fxp1 lo0\"" >> $conf
# setup gateway, parse netstat output
gw=`netstat -rn | grep '^default' | sed 's/[ ][ ]*/ /g' | cut -f2 -d" "`
echo "defaultrouter=\"${gw}\"" >> $conf
pwd_mkdb -p /etc/master.passwd
exit 0

View file

@ -0,0 +1,7 @@
#!/bin/sh
# $Wintelcom: src/freebsd/pxe/doc/pre,v 1.1 2000/07/14 12:42:05 bright Exp $
# $FreeBSD$
echo pre-install
exit 0