head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


1.2
date	2005.09.21.09.40.45;	author phk;	state dead;
branches;
next	1.1;

1.1
date	2005.07.25.08.40.13;	author philip;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Update these scripts to be more userfriendly and usage safe.
@
text
@#!/bin/sh
#
# $FreeBSD: src/tools/tools/nanobsd/Files/root/updatep,v 1.1 2005/07/25 08:40:13 philip Exp $
#
# Script to update the ALTROOTSLICE on NanoBSD systems.
#
# usage:
#	mdconfig -a -t vnode -f _.i.s1
#	ssh somewhere sh updatep < /dev/md0a
#	mdconfig -d -u 0
#

set -e

altslice=`grep /alt /etc/fstab | cut -d \  -f 1`

if mount | grep $altslice > /dev/null ; then
	echo "You have $altslice mounted, unmount it first"
	exit 1
fi

(echo 1 >/dev/led/error) 2>/dev/null || true
dd of=$altslice obs=64k
boot0cfg -s 1 -v ad0
(echo 0 >/dev/led/error) 2>/dev/null || true
@


1.1
log
@Add fstab entries for ALTROOTSLICE and CFGSLICE, allowing us to do away with
most of the hardcoding of device names in installed convenience scripts.

Provide a new script (root/updatep) to easily update the ALTROOTSLICE.  It
does the same as updatep1/updatep2 without hardcoded device names.  If noone
protests, I'd like to get rid of updatep1/updatep2 at some point.

As an extra bonus: turn on the error led while updating (on hardware with a
led).
@
text
@d3 1
a3 1
# $FreeBSD$
@

