update revision 62346
1#!/bin/sh 2# $FreeBSD: head/release/picobsd/mfs_tree/stand/update 62346 2000-07-01 12:04:15Z roger $ 3# script to edit and save some config file(s) 4thefiles=$* 5pwd=`pwd` 6set `df /` ; dev="/dev/$8" 7echo "Updating content on ${dev}: " 8mount ${dev} /mnt 9if [ "X$?" != "X0" ] ; then 10 echo "" 11 echo "Cannot mount ${dev} read-write!" 12 exit 1 13fi 14if [ "$thefiles" = "" ] ; then 15 srcs=`ls /etc` 16 for i in $srcs ; do 17 if [ -f /mnt/etc/$i.gz ] ; then 18 echo -n "$i ..." 19 gzip < /etc/$i > /mnt/etc/$i.gz 20 fi 21 done 22elif [ "$thefiles" = "passwd" ] ; then 23 ee /etc/master.passwd 24 pwd_mkdb master.passwd 25 gzip < /etc/master.passwd /mnt/etc/master.passwd.gz 26else 27 for i in $thefiles; do 28 if [ -f $i ] ; then 29 ee $i 30 gzip < $i > /mnt/$i.gz 31 fi 32 done 33fi 34echo " Done." 35echo -n "Updating kernel parameters... " 36kget /mnt/boot/kernel.conf 37umount /mnt 38cd ${pwd} 39echo " Done." 40