update revision 61119
1#!/bin/sh 2# $FreeBSD: head/release/picobsd/mfs_tree/stand/update 61119 2000-05-31 12:25:39Z luigi $ 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 33echo " Done." 34echo -n "Updating kernel parameters... " 35kget /mnt/boot/kernel.conf 36umount /mnt 37cd ${pwd} 38echo " Done." 39