Index: trunk/nanobsd/files/tools/change_password
===================================================================
--- trunk/nanobsd/files/tools/change_password	(revision 10172)
+++ trunk/nanobsd/files/tools/change_password	(revision 10172)
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# Copyright (c) 2004-2005 Poul-Henning Kamp.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD: src/tools/tools/nanobsd/Files/root/change_password,v 1.3.6.1 2008/11/25 02:59:29 kensmith Exp $
+#
+
+set -e
+
+passwd root
+
+cfgslice=`grep '/cfg' /etc/fstab | cut -d \  -f 1`
+
+trap "umount /cfg" 1 2 15 EXIT
+mount /cfg
+cp /etc/master.passwd /etc/passwd /etc/pwd.db /etc/spwd.db /etc/group /cfg
+umount /cfg
+trap 1 2 15 EXIT
Index: trunk/nanobsd/files/tools/dhcpd_snmp.sh
===================================================================
--- trunk/nanobsd/files/tools/dhcpd_snmp.sh	(revision 10172)
+++ trunk/nanobsd/files/tools/dhcpd_snmp.sh	(revision 10172)
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Write dhcpd ranges to dhcpd-snmp.conf 
+
+DHCPD="/usr/local/etc/dhcpd.conf"
+DHSNMP="/usr/local/etc/dhcpd-snmp.conf"
+INDEX="0"
+
+DHPOOL=`cat ${DHCPD} | grep range | awk '{print $2"-"$3}' | cut -d";" -f1`
+for range in ${DHPOOL}
+do 
+   $((INDEX=INDEX+1)) 		
+   echo "`echo "pool:" $INDEX", pool"$INDEX", "$range | \
+   sed 's/^.*(//'`" >> $DHSNMP	
+done
+
Index: trunk/nanobsd/files/tools/find-nanostation
===================================================================
--- trunk/nanobsd/files/tools/find-nanostation	(revision 10172)
+++ trunk/nanobsd/files/tools/find-nanostation	(revision 10172)
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Discover nanostation using CDPv1 packets
+# Credits: http://sidewynder.blogspot.com/2005/07/tcpdump-filter-for-capturing-only.html
+
+if [ "x$1" = "x" ]; then
+  echo "Usage: $0 <iface> [count]" 1>&2
+  echo "Find (lost) Nanostation IP using 'count' CDPv1 packet(s)"
+  echo "Normally CDPv1 packets get send every minute" 1>&2
+  echo "Interface hints: `ifconfig -l`" 1>&2
+  exit 1
+fi
+IFACE=$1
+# By default the local and remote will announce a broadcast.
+COUNT=${2-2}
+
+
+tcpdump -nn -v -i $IFACE -s 1500 -c $COUNT 'ether[18:4] == 0x000c2000'
Index: trunk/nanobsd/files/tools/save_sshkeys
===================================================================
--- trunk/nanobsd/files/tools/save_sshkeys	(revision 10172)
+++ trunk/nanobsd/files/tools/save_sshkeys	(revision 10172)
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# Copyright (c) 2004-2005 Poul-Henning Kamp.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD: src/tools/tools/nanobsd/Files/root/save_sshkeys,v 1.4.6.1 2008/11/25 02:59:29 kensmith Exp $
+#
+
+set -e
+
+trap "umount /cfg" 1 2 15 EXIT
+mount /cfg
+mkdir -p /cfg/ssh
+(
+cd /etc/ssh
+cp ssh_host_* /cfg/ssh
+)
+umount /cfg
+trap 1 2 15 EXIT
Index: trunk/nanobsd/files/tools/syslogd_flag.sh
===================================================================
--- trunk/nanobsd/files/tools/syslogd_flag.sh	(revision 10172)
+++ trunk/nanobsd/files/tools/syslogd_flag.sh	(revision 10172)
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Set hostname for syslogd -b flag
+
+HOST=`cat /etc/rc.conf.local | grep hostname | cut -d'"' -f2`
+sed -i "" -e /syslogd_flags=/s/localhost/${HOST}/ /etc/rc.conf
+
+
Index: trunk/nanobsd/files/tools/update
===================================================================
--- trunk/nanobsd/files/tools/update	(revision 10172)
+++ trunk/nanobsd/files/tools/update	(revision 10172)
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Update the non-active partition, input will stdin if no argument given else a
+# listing netcat sesion will be opened at the given port
+# Can be used in the following setups:
+# 1) Systems with CPU limits (e.g. no encryption and/or  compression):
+#   ssh -oBatchMode=yes root@node.example.org /tools/update-wrapper 3333 &
+#   cat nanobsd.image | nc node.example.org 3333
+# 2) Standard setup:
+#   cat nanobsd.image | ssh -oBatchMode=yes root@node.example.org /tools/update-wrapper
+#
+# Licence: BSD http://wirelessleiden.nl/LICENSE
+#
+# Rick van der Zwet <info@rickvanderzwet.nl>
+
+. /etc/nanobsd.conf
+
+ROOT=`cd $(dirname $0); pwd -P`
+
+# Find out which partion to use
+mount | grep -q ${NANO_DRIVE}s1 && UPDATE=$ROOT/updatep2 || UPDATE=$ROOT/updatep1 
+
+if [ -z $1 ]; then
+ $UPDATE
+else
+ nc -l $1 | $UPDATE
+fi
Index: trunk/nanobsd/files/tools/updatep1
===================================================================
--- trunk/nanobsd/files/tools/updatep1	(revision 10172)
+++ trunk/nanobsd/files/tools/updatep1	(revision 10172)
@@ -0,0 +1,55 @@
+#!/bin/sh
+#
+# Copyright (c) 2004-2005 Poul-Henning Kamp.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD: src/tools/tools/nanobsd/Files/root/updatep1,v 1.2.6.1 2008/11/25 02:59:29 kensmith Exp $
+#
+# Script to update partition 1 on a NanoBSD system.
+#
+# usage:
+#	ssh somewhere cat image.s1 | sh updatep1
+#
+
+set -e
+
+. /etc/nanobsd.conf
+
+if mount | grep ${NANO_DRIVE}s1 > /dev/null ; then
+	echo "You are running partition 1 already"
+	echo "you probably want to use 'updatep2' instead"
+	exit 1
+fi
+
+# Blow away old system.
+dd if=/dev/zero of=/dev/${NANO_DRIVE}s1 bs=1m count=1 > /dev/null 2>&1
+
+# Copy in new system
+dd of=/dev/${NANO_DRIVE}s1 obs=64k
+
+# Check that it worked
+fsck_ffs -n /dev/${NANO_DRIVE}s1a
+
+gpart set -a active -i 1 ${NANO_DRIVE}
+
Index: trunk/nanobsd/files/tools/updatep2
===================================================================
--- trunk/nanobsd/files/tools/updatep2	(revision 10172)
+++ trunk/nanobsd/files/tools/updatep2	(revision 10172)
@@ -0,0 +1,63 @@
+#!/bin/sh
+#
+# Copyright (c) 2004-2005 Poul-Henning Kamp.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD: src/tools/tools/nanobsd/Files/root/updatep2,v 1.2.6.1 2008/11/25 02:59:29 kensmith Exp $
+#
+# Script to update partition 2 on a NanoBSD system.
+#
+# usage:
+#	ssh somewhere cat image.s1 | sh updatep2
+#
+
+set -e
+
+. /etc/nanobsd.conf
+
+if mount | grep ${NANO_DRIVE}s2 > /dev/null ; then
+	echo "You are running partition 2 already"
+	echo "you probably want to use 'updatep1' instead"
+	exit 1
+fi
+
+# Blow away old system.
+dd if=/dev/zero of=/dev/${NANO_DRIVE}s2 bs=1m count=1 > /dev/null 2>&1
+
+# Copy in new system
+dd of=/dev/${NANO_DRIVE}s2 obs=64k
+
+# Check that it worked
+fsck_ffs -n /dev/${NANO_DRIVE}s2a
+
+# Update the /etc/fstab
+trap "umount /mnt" 1 2 15 EXIT
+mount /dev/${NANO_DRIVE}s2a /mnt
+sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/" /mnt/conf/base/etc/fstab
+sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/" /mnt/etc/fstab
+umount /mnt
+trap 1 2 15 EXIT
+
+gpart set -a active -i 2 ${NANO_DRIVE}
+
Index: trunk/nanobsd/files/tools/wl-config
===================================================================
--- trunk/nanobsd/files/tools/wl-config	(revision 10172)
+++ trunk/nanobsd/files/tools/wl-config	(revision 10172)
@@ -0,0 +1,272 @@
+#!/bin/sh
+# Wireless Leiden config-update script for FreeBSD 8.0 (nanobsd)
+# Based on the 'API' of Jasper
+# Rick van der Zwet
+# XXX: TODO, some proper error checking for fetch
+
+
+# Slow connection = no connection
+export HTTP_TIMEOUT=3
+
+
+check_access() {
+  # Direct Access - Internal IP 
+  BASEURL="http://172.16.4.46/wleiden/config/"
+  echo "# INFO: Trying to fetch via internal WL $BASEURL"
+  fetch -o /dev/null -q $BASEURL > /dev/null && return
+  echo "# WARN: Fetch via internal $BASEURL failed"
+  
+  # Direct Access - External DNS
+  BASEURL="http://132.229.112.21/wleiden/config/"
+  echo "# INFO: Trying to fetch via external $BASEURL"
+  fetch -o /dev/null -q $BASEURL > /dev/null && return
+  echo "# CRIT: Fetch via external $BASEURL failed"
+
+  exit 1
+}
+check_access
+
+
+# Default config to fetch
+CONFIG=`hostname -s`
+
+# Determine it's statup and running location and some other hints
+# Skip named.conf as it not planned in current release
+FILES="authorized_keys dnsmasq.conf rc.conf.local resolv.conf motd wleiden.yaml"
+file_details() {
+  case "$1" in 
+  'authorized_keys')
+     STARTUP_LOC="/cfg/dot_ssh/${FILE}"
+     RUNNING_LOC="/etc/dot_ssh/${FILE}"
+     FILE_HINT=""
+   ;;
+  'motd')
+     STARTUP_LOC="/cfg/$1"
+     RUNNING_LOC="/etc/$1"
+     FILE_HINT=""
+   ;;
+  'dnsmasq.conf')
+     STARTUP_LOC="/cfg/local/${FILE}"
+     RUNNING_LOC="/etc/local/${FILE}"
+     FILE_HINT="/usr/local/etc/rc.d/dnsmasq restart"
+   ;;
+  'named.conf')
+     STARTUP_LOC="/cfg/namedb/${FILE}"
+     RUNNING_LOC="/etc/namedb/${FILE}"
+     FILE_HINT="/etc/rc.d/named restart"
+   ;;
+  'rc.conf.local')
+     STARTUP_LOC="/cfg/${FILE}"
+     RUNNING_LOC="/etc/${FILE}"
+     FILE_HINT="/etc/rc.d/netif restart"
+   ;;
+   'resolv.conf')
+     STARTUP_LOC="/cfg/${FILE}"
+     RUNNING_LOC="/etc/${FILE}"
+     FILE_HINT=""
+   ;;
+   'wleiden.yaml')
+     STARTUP_LOC="/cfg/local/${FILE}"
+     RUNNING_LOC="/etc/local/${FILE}"
+     FILE_HINT=""
+   ;;
+  esac
+}
+
+usage() {
+	(
+	echo "Usage: $0 [-bn] [-c <config>] [-m <all|startup|testing|running>]"
+	echo "	-b          = batch mode, no user input"
+	echo "	-c <config> = default configuration to fetch"
+	echo "	-n          = do not mount config partition"
+	echo "	-m all      = copy config files to running & config partition [default]"
+	echo "	-m startup  = copy config files to config partition"
+	echo "	-m testing  = do not copy config files"
+	echo "	-m running  = copy config files to running partition"
+	echo "	-m hack     = copy running files to config partition"
+	) 1>&2
+	exit 2
+}
+
+# Argument parsing using getopts
+USE_API=1		# Whether or not to use the webinterface
+OPT_MOUNT=1
+OPT_RUNNING=1
+OPT_STARTUP=1
+OPT_HACK=0		# Hack for people without configuration managment and testing
+OPT_BATCH=0
+
+parse_options() {
+  while getopts "bc:nm:" OPT; do
+  	case "$OPT" in
+  	b) OPT_BATCH=1;;
+  	c) CONFIG="${OPTARG}";;
+  	n) OPT_MOUNT=0;;
+  	m) case "$OPTARG" in
+  	   all) true;;
+  	   live) OPT_STARTUP=0;;	
+  	   startup) OPT_RUNNING=0;;		
+  	   testing) OPT_RUNNING=0; OPT_STARTUP=0; OPT_MOUNT=0;;		
+  	   hack) OPT_RUNNING=0; OPT_STARTUP=0; OPT_HACK=1; USE_API=0;;		
+  	   *) usage;;
+  	   esac;;
+  	h) usage;;
+  	\?) usage;;
+  	esac
+  done
+  # Allow to override automatic mounting, in case of external mount 'managment'
+  if [ "$1" = "-n" ]; then
+  	OPT_MOUNT=0
+  fi
+  
+  if [ "${OPT_RUNNING}" -eq 1 ]; then
+    echo "# INFO: Storing new config files in running configuration"
+  fi
+  
+  if [ "${OPT_STARTUP}" -eq 1 ]; then
+    echo "# INFO: Storing new config files in startup configuration"
+  fi
+  
+  if [ "${OPT_HACK}" -eq 1 ]; then
+    echo "# WARN: Copy running configuration to startup configuration"
+    echo "# WARN: Please do mind to document/mention this changes somewhere"
+  fi
+
+  # New line before the real work gets started
+  echo "" 
+}
+
+
+
+
+# test validity of input
+config_validator() {
+  INPUT="$1"
+  `grep -q "^${INPUT}\$" ${TMPDIR}/node_list.txt`
+  if [ $? -eq 0 ]; then
+    return 0
+  else 
+     echo "WARNING: Input '${INPUT}' is not valid, some hints..."
+     grep -i "${INPUT}" ${TMPDIR}/node_list.txt
+     return 1
+  fi  
+}
+
+
+
+select_node() {
+  # List of all available nodes
+  fetch -q -o ${TMPDIR}/node_list.txt ${BASEURL} || exit 1
+  
+  # Provide Nodelist and feedback
+  cat ${TMPDIR}/node_list.txt | column
+  echo '       THIS script adds the config from GENESIS to this operating system'
+  echo '       make sure you know what you are doing, if not press control-C'
+  echo '       ENTER CONFIG NAME  ......(and press enter)'
+
+  if [ ${OPT_BATCH} -eq 1 ]; then
+    config_validator "${CONFIG}"
+   if [ $? -eq 1 ]; then
+     echo "ERROR: Please provide valid config" 1>&2
+     exit 1
+   fi
+  else
+    # Have the user to select the right node
+    INVALID_CONFIG=1
+    while [ ${INVALID_CONFIG} -eq 1 ]; do
+      # Ask for node name, play around with prev option
+      echo -n "Name [${CONFIG}]: "
+      read INPUT
+      if [ -z "${INPUT}" ]; then
+        INPUT=${CONFIG}
+      else
+        CONFIG=${INPUT}
+      fi
+    
+      config_validator "${INPUT}"
+      if [ $? -eq 0 ]; then
+         INVALID_CONFIG=0
+      fi  
+    done
+  fi
+}
+
+
+
+
+# Copy file, saving some bits if no change needed
+copy_file() {
+  NEWFILE=$1
+  TARGET=$2
+  diff -I '^# Generated at ' ${TARGET} ${NEWFILE} 2>/dev/null
+  if [ $? -ne 0 ]; then
+    mkdir -p `dirname ${TARGET}` || exit 1
+    cp ${NEWFILE} ${TARGET} || exit 1
+    return $?
+  fi
+  return 1
+}
+
+# Main function
+main() {
+  TMPDIR=`mktemp -d -t $(basename $0)`
+  # Clear out tempdir when done
+  if [ ${OPT_MOUNT} -eq 1 ]; then
+  	trap "rm -Rf ${TMPDIR}; umount /cfg; mount -ro noatime /; exit" 0 1 2 3 15
+  else
+  	trap "rm -Rf ${TMPDIR}; exit" 0 1 2 3 15
+  
+  fi
+  
+  # Mount if requested
+  if [ ${OPT_MOUNT} -eq 1 ]; then
+  	mount -uwo noatime /
+  	mount /cfg
+  fi
+
+  # Select node from web-interface
+  if [ ${USE_API} -eq 1 ]; then
+  	select_node
+  fi
+  
+  # Worker, place all files in required directory
+  for FILE in ${FILES}; do
+    if [ ${USE_API} -eq 1 ]; then
+      # Fetch needed file
+      FRESH_LOC=${TMPDIR}/${FILE}
+      fetch -q -o ${FRESH_LOC} ${BASEURL}/${CONFIG}/${FILE} || exit 1
+    fi
+  
+    # Needed file details, like locations and hints
+    file_details ${FILE}
+  
+    echo "# INFO: Working on file: '${FILE}'"
+    # Copy file boot location
+    if [ ${OPT_STARTUP} -eq 1 ]; then
+      copy_file ${FRESH_LOC} ${STARTUP_LOC}
+    fi
+  
+    # Copy file running location
+    if [ ${OPT_RUNNING} -eq 1 ]; then
+      copy_file ${FRESH_LOC} ${RUNNING_LOC}
+      if [ $? -eq 0 ]; then
+        echo "# INFO: '${FILE}' changed"  
+        if [ -n "${FILE_HINT}" ]; then
+          echo "# INFO: For instant activate: ${FILE_HINT}"
+          echo ""
+        fi
+      fi
+    fi
+  
+    # Direct copy
+    if [ ${OPT_HACK} -eq 1 ]; then
+      # No checking, just dumb try to copy mode
+      cp -v ${RUNNING_LOC} ${STARTUP_LOC}
+    fi
+  done
+  
+  exit 0
+}
+
+parse_options $*
+main
Index: trunk/nanobsd/files/tools/wl-version
===================================================================
--- trunk/nanobsd/files/tools/wl-version	(revision 10172)
+++ trunk/nanobsd/files/tools/wl-version	(revision 10172)
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Get bare minimal information of node, for the use of easy debugging
+# Rick van der Zwet <info@rickvanderzwet.nl>
+
+# Trac specific code
+echo "----"
+echo "{{{"
+
+# Introduction
+echo "Generated by $USER@`hostname`"
+echo "Date: `date`"
+
+# Kernel information
+uname -a | fold
+
+# Mount information, for the use of checking which slize is usd
+mount
+
+# static iinformation, on image, like build, time, who,
+VERSION='/tools/wl-release.txt'
+cat $VERSION
+
+if [ -r /VERSION ]; then
+	cat /VERSION
+	seperator
+fi
+
+# Current ip configuration
+ifconfig -a
+
+# XXX: Configuration specifics
+
+# Trac specific code
+echo "}}}"
+echo "----"
