summaryrefslogtreecommitdiffstats
path: root/release/picobsd/mfs_tree/stand
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2000-05-31 12:25:39 +0000
committerluigi <luigi@FreeBSD.org>2000-05-31 12:25:39 +0000
commitd929968cbc697f3d7edb92bfadcd8133f6f3819c (patch)
tree8d50ffc5a34b93601c7fd66bb2a0ff7254aa3310 /release/picobsd/mfs_tree/stand
parentadf206f08d0961c0a055887e569c6d309e3dd2bb (diff)
downloadFreeBSD-src-d929968cbc697f3d7edb92bfadcd8133f6f3819c.zip
FreeBSD-src-d929968cbc697f3d7edb92bfadcd8133f6f3819c.tar.gz
Move mfs-related files to a new location
Diffstat (limited to 'release/picobsd/mfs_tree/stand')
-rwxr-xr-xrelease/picobsd/mfs_tree/stand/update38
1 files changed, 38 insertions, 0 deletions
diff --git a/release/picobsd/mfs_tree/stand/update b/release/picobsd/mfs_tree/stand/update
new file mode 100755
index 0000000..22753fe
--- /dev/null
+++ b/release/picobsd/mfs_tree/stand/update
@@ -0,0 +1,38 @@
+#!/bin/sh
+# $FreeBSD$
+# script to edit and save some config file(s)
+thefiles=$*
+pwd=`pwd`
+set `df /` ; dev="/dev/$8"
+echo "Updating content on ${dev}: "
+mount ${dev} /mnt
+if [ "X$?" != "X0" ] ; then
+ echo ""
+ echo "Cannot mount ${dev} read-write!"
+ exit 1
+fi
+if [ "$thefiles" = "" ] ; then
+ srcs=`ls /etc`
+ for i in $srcs ; do
+ if [ -f /mnt/etc/$i.gz ] ; then
+ echo -n "$i ..."
+ gzip < /etc/$i > /mnt/etc/$i.gz
+ fi
+ done
+elif [ "$thefiles" = "passwd" ] ; then
+ ee /etc/master.passwd
+ pwd_mkdb master.passwd
+ gzip < /etc/master.passwd /mnt/etc/master.passwd.gz
+else
+ for i in $thefiles; do
+ if [ -f $i ] ; then
+ ee $i
+ gzip < $i > /mnt/$i.gz
+ fi
+ done
+echo " Done."
+echo -n "Updating kernel parameters... "
+kget /mnt/boot/kernel.conf
+umount /mnt
+cd ${pwd}
+echo " Done."
OpenPOWER on IntegriCloud