Date: Mon, 10 Apr 2006 22:30:32 -0700 From: Garrett Cooper <youshi10@u.washington.edu> To: freebsd-questions@freebsd.org Subject: Need /bin/sh script help Message-ID: <443B3EF8.3020308@u.washington.edu>
next in thread | raw e-mail | index | archive | help
Hello again all,
Just making a series of sh scripts to help automate updating and
whatnot of my fileserver (since I am trying to avoid having mistakes
occur with my system, and maybe help the community out a bit by
providing some decent means of updating their own machines), and I was
wondering if anyone could help me out with the following script I've
developing (the grep if statements are incorrect..):
#!/bin/sh
#
KC="";
cd /usr/src;
if [ -n `grep -e s/KERNCONF=/ /etc/make.conf` ] # want to look for
KERNCONF in /etc/make.conf
then
echo "enter in the kernel conf file full pathname:";
read KERNCONF;
KC="KERNCONF=$KERNCONF";
fi
if [ -n `grep -e s/NO_CLEAN=*yes*/ /etc/make.conf` ] // want to look for
NO_CLEAN in /etc/make.conf -- is this really necessary?
then
cd sys;
echo "cleaning sources"
make clean;
make cleandir;
cd ..;
fi
echo "building kernel";
make buildkernel $KC;
echo "installing kernel";
make installkernel $KC;
echo "kernel compile complete. reboot to try new kernel";
TIA,
-Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?443B3EF8.3020308>
