--- voyage-util-0.6.orig/.svn/entries
+++ voyage-util-0.6/.svn/entries
@@ -1,158 +1,28 @@
-<?xml version="1.0" encoding="utf-8"?>
-<wc-entries
-   xmlns="svn:">
-<entry
-   committed-rev="10"
-   name=""
-   committed-date="2006-06-12T00:24:12.607697Z"
-   url="http://bbrack.org/svn/repos/voyage-scripts/trunk"
-   last-author="bill"
-   kind="dir"
-   uuid="7b58f710-b613-0410-bf5a-f847c01fa489"
-   revision="10"/>
-<entry
-   committed-rev="1"
-   name="ns"
-   text-time="2006-05-13T15:13:08.000000Z"
-   committed-date="2006-05-13T14:28:32.969466Z"
-   checksum="2b71a5206007b7d7ab96d1e67a0de190"
-   last-author="bill"
-   kind="file"
-   uuid="95aae017-ab13-0410-860a-e3e12d3642a9"
-   prop-time="2006-05-13T15:13:07.000000Z"/>
-<entry
-   committed-rev="1"
-   name="DesignNotes"
-   text-time="2006-05-13T15:13:08.000000Z"
-   committed-date="2006-05-13T14:28:32.969466Z"
-   checksum="2e64f401c50d2d892e7347301e798533"
-   last-author="bill"
-   kind="file"
-   uuid="95aae017-ab13-0410-860a-e3e12d3642a9"
-   prop-time="2006-05-13T15:13:07.000000Z"/>
-<entry
-   committed-rev="6"
-   name="voyage-update.sh"
-   text-time="2006-05-17T13:22:35.000000Z"
-   committed-date="2006-05-17T09:48:35.923124Z"
-   checksum="fd37be26398414642ac5e315dd891631"
-   last-author="bill"
-   kind="file"
-   prop-time="2006-05-17T13:22:32.000000Z"/>
-<entry
-   committed-rev="6"
-   name="select-profile.sh"
-   text-time="2006-05-17T13:22:35.000000Z"
-   committed-date="2006-05-17T09:48:35.923124Z"
-   checksum="73f18957998a7817ddf5d6869085aa81"
-   last-author="bill"
-   kind="file"
-   prop-time="2006-05-17T13:22:33.000000Z"/>
-<entry
-   committed-rev="10"
-   name="Changelog"
-   text-time="2006-06-16T15:54:06.000000Z"
-   committed-date="2006-06-12T00:24:12.607697Z"
-   checksum="a758661d5b2a1f8f265c24a0ea8ccbdc"
-   last-author="bill"
-   kind="file"
-   prop-time="2006-06-16T15:54:05.000000Z"/>
-<entry
-   committed-rev="6"
-   name="setboot.sh"
-   text-time="2006-05-17T13:22:35.000000Z"
-   committed-date="2006-05-17T09:48:35.923124Z"
-   checksum="c31a50b9aa2f0ed4f1813bc28f847e99"
-   last-author="bill"
-   kind="file"
-   prop-time="2006-05-17T13:22:34.000000Z"/>
-<entry
-   committed-rev="10"
-   name="make-kernel"
-   text-time="2006-06-16T15:54:06.000000Z"
-   committed-date="2006-06-12T00:24:12.607697Z"
-   checksum="5823bbf7ee5c8d8a59846082c2b119b6"
-   last-author="bill"
-   kind="file"
-   prop-time="2006-06-16T15:54:05.000000Z"/>
-<entry
-   name="experimental"
-   kind="dir"/>
-<entry
-   committed-rev="1"
-   name="ConfNotes"
-   text-time="2006-05-13T15:13:08.000000Z"
-   committed-date="2006-05-13T14:28:32.969466Z"
-   checksum="311145152f58f4694164de75fd44c71b"
-   last-author="bill"
-   kind="file"
-   uuid="95aae017-ab13-0410-860a-e3e12d3642a9"
-   prop-time="2006-05-13T15:13:08.000000Z"/>
-<entry
-   committed-rev="6"
-   name="DeveloperNotes"
-   text-time="2006-05-17T13:22:35.000000Z"
-   committed-date="2006-05-17T09:48:35.923124Z"
-   checksum="c5422f0bb2daa7dc6a248fb4b1b4b16e"
-   last-author="bill"
-   kind="file"
-   prop-time="2006-05-17T13:22:35.000000Z"/>
-<entry
-   committed-rev="6"
-   name="update-config.sh"
-   text-time="2006-05-17T13:22:35.000000Z"
-   committed-date="2006-05-17T09:48:35.923124Z"
-   checksum="c7e6cdd18dc1e3b10079d92449a2d4ec"
-   last-author="bill"
-   kind="file"
-   prop-time="2006-05-17T13:22:35.000000Z"/>
-<entry
-   committed-rev="10"
-   name="make-initrd"
-   text-time="2006-06-16T15:54:06.000000Z"
-   committed-date="2006-06-12T00:24:12.607697Z"
-   checksum="da40c7aed17a2293f4f6900ea4f943dc"
-   last-author="bill"
-   kind="file"
-   prop-time="2006-06-16T15:54:06.000000Z"/>
-<entry
-   committed-rev="6"
-   name="copyfiles.sh"
-   text-time="2006-05-17T13:22:35.000000Z"
-   committed-date="2006-05-17T09:48:35.923124Z"
-   checksum="45a6ae381a2a45d0bceb0abbc7196aa2"
-   last-author="bill"
-   kind="file"
-   prop-time="2006-05-17T13:22:33.000000Z"/>
-<entry
-   committed-rev="6"
-   name="voyage-install.sh"
-   text-time="2006-05-17T13:22:35.000000Z"
-   committed-date="2006-05-17T09:48:35.923124Z"
-   checksum="858d799fce1303545caebdb158799a3d"
-   last-author="bill"
-   kind="file"
-   prop-time="2006-05-17T13:22:34.000000Z"/>
-<entry
-   name="voyage-profiles"
-   kind="dir"/>
-<entry
-   committed-rev="1"
-   name="voyage.update"
-   text-time="2006-05-13T15:13:08.000000Z"
-   committed-date="2006-05-13T14:28:32.969466Z"
-   checksum="bed72ae5dc258b4a4e1a505e251b7683"
-   last-author="bill"
-   kind="file"
-   uuid="95aae017-ab13-0410-860a-e3e12d3642a9"
-   prop-time="2006-05-13T15:13:08.000000Z"/>
-<entry
-   committed-rev="6"
-   name="script-utils.sh"
-   text-time="2006-05-17T13:22:35.000000Z"
-   committed-date="2006-05-17T09:48:35.923124Z"
-   checksum="50268222fa6a92f445b29f0a60f66a18"
-   last-author="bill"
-   kind="file"
-   prop-time="2006-05-17T13:22:34.000000Z"/>
-</wc-entries>
+8
+
+dir
+77
+http://svn.voyage.hk/repos/voyage/trunk/voyage-util
+http://svn.voyage.hk/repos/voyage
+
+
+
+2009-02-17T13:26:56.131827Z
+77
+punkytse
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+fc1de9d0-7410-4adc-bb29-da8c0547dad5
+
--- voyage-util-0.6.orig/.svn/format
+++ voyage-util-0.6/.svn/format
@@ -1 +1 @@
-4
+8
--- voyage-util-0.6.orig/.svn/all-wcprops
+++ voyage-util-0.6/.svn/all-wcprops
@@ -0,0 +1,5 @@
+K 25
+svn:wc:ra_dav:version-url
+V 43
+/repos/voyage/!svn/ver/77/trunk/voyage-util
+END
--- voyage-util-0.6.orig/debian/README.Debian
+++ voyage-util-0.6/debian/README.Debian
@@ -0,0 +1,6 @@
+voyage-util for Debian
+----------------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- Punky Tse <punkytse@yahoo.com>, Sun, 18 Jun 2006 16:53:51 +0800
--- voyage-util-0.6.orig/debian/changelog
+++ voyage-util-0.6/debian/changelog
@@ -0,0 +1,64 @@
+voyage-util (0.6-2) unstable; urgency=low
+
+  * new upstream release
+  * support for amd64
+  * fix for grub
+  * move voyage-sync and voyage-pxe from voyage-live
+
+ -- Punky Tse <punkytse@punknix.com>  Mon,  2 Feb 2009 22:25:36 +0800
+
+voyage-util (0.6-1) unstable; urgency=low
+
+  * new upstream release
+  * remove fstab, kernel-img.conf
+
+ -- Punky Tse <punkytse@punknix.com>  Fri, 11 Jul 2008 22:53:46 +0800
+
+voyage-util (0.5-2) unstable; urgency=low
+
+  * add led support in /etc/init.d/voyage-utils
+
+ -- Punky Tse <punkytse@punknix.com>  Mon, 24 Mar 2008 20:37:30 +0800
+
+voyage-util (0.5-1) unstable; urgency=low
+
+  * file system lable patch (by Mike O'Connor)
+  * fix lilo at installation (by William Brack)
+  * fix bootloader config not load correctly
+  * add support LED modules for ALIX and WRAP
+
+ -- Punky Tse <punkytse@punknix.com>  Tue, 22 Jan 2008 23:07:29 +0800
+
+voyage-util (0.4-2) unstable; urgency=low
+
+  * add ALIX and 5501 installation profile
+
+ -- root <root@punknix.com>  Sun, 24 Jun 2007 18:02:34 +0800
+
+voyage-util (0.4-1) unstable; urgency=low
+
+  * new upstream 0.4 release
+  * change banner to 0.4 version
+  * update setboot.sh for grub install for FC6 (William M. Brack)
+
+ -- root <root@punknix.com>  Wed, 21 Mar 2007 01:00:11 +0800
+
+voyage-util (0.3-3) unstable; urgency=low
+
+  * add auto-install.sh
+  * change default settings in voyage-profiles
+
+ -- root <root@punknix.com>  Mon,  5 Feb 2007 11:22:44 +0800
+
+voyage-util (0.3-2) unstable; urgency=low
+
+  * Remove unnecessary files
+
+ -- root <root@punknix.com>  Tue,  5 Dec 2006 23:36:51 +0800
+
+voyage-util (0.3-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- root <root@punknix.com>  Tue,  5 Dec 2006 23:36:48 +0800
+
--- voyage-util-0.6.orig/debian/compat
+++ voyage-util-0.6/debian/compat
@@ -0,0 +1 @@
+4
--- voyage-util-0.6.orig/debian/conffiles.ex
+++ voyage-util-0.6/debian/conffiles.ex
@@ -0,0 +1,7 @@
+#
+# If you want to use this conffile, remove all comments and put files that
+# you want dpkg to process here using their absolute pathnames.
+# See the policy manual
+#
+# for example:
+# /etc/voyage-util/voyage-util.conf
--- voyage-util-0.6.orig/debian/cron.d.ex
+++ voyage-util-0.6/debian/cron.d.ex
@@ -0,0 +1,4 @@
+#
+# Regular cron jobs for the voyage-util package
+#
+0 4	* * *	root	voyage-util_maintenance
--- voyage-util-0.6.orig/debian/dirs
+++ voyage-util-0.6/debian/dirs
@@ -0,0 +1 @@
+usr/local/sbin
--- voyage-util-0.6.orig/debian/emacsen-install.ex
+++ voyage-util-0.6/debian/emacsen-install.ex
@@ -0,0 +1,45 @@
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/voyage-util
+
+# Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
+# from the install scripts for gettext by Santiago Vila
+# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
+
+FLAVOR=$1
+PACKAGE=voyage-util
+
+if [ ${FLAVOR} = emacs ]; then exit 0; fi
+
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+#FLAVORTEST=`echo $FLAVOR | cut -c-6`
+#if [ ${FLAVORTEST} = xemacs ] ; then
+#    SITEFLAG="-no-site-file"
+#else
+#    SITEFLAG="--no-site-file"
+#fi
+FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
+
+ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+# Install-info-altdir does not actually exist. 
+# Maybe somebody will write it.
+if test -x /usr/sbin/install-info-altdir; then
+    echo install/${PACKAGE}: install Info links for ${FLAVOR}
+    install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
+fi
+
+install -m 755 -d ${ELCDIR}
+cd ${ELDIR}
+FILES=`echo *.el`
+cp ${FILES} ${ELCDIR}
+cd ${ELCDIR}
+
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+${FLAVOR} ${FLAGS} ${FILES}
+rm -f *.el path.el
+
+exit 0
--- voyage-util-0.6.orig/debian/emacsen-remove.ex
+++ voyage-util-0.6/debian/emacsen-remove.ex
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/voyage-util
+
+FLAVOR=$1
+PACKAGE=voyage-util
+
+if [ ${FLAVOR} != emacs ]; then
+    if test -x /usr/sbin/install-info-altdir; then
+        echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
+        install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/voyage-util.info.gz
+    fi
+
+    echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+    rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+fi
--- voyage-util-0.6.orig/debian/emacsen-startup.ex
+++ voyage-util-0.6/debian/emacsen-startup.ex
@@ -0,0 +1,19 @@
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file for the Debian voyage-util package
+;;
+;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
+;; Modified by Dirk Eddelbuettel <edd@debian.org>
+;; Adapted for dh-make by Jim Van Zandt <jrv@vanzandt.mv.com>
+
+;; The voyage-util package follows the Debian/GNU Linux 'emacsen' policy and
+;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
+;; xemacs19, emacs20, xemacs20...).  The compiled code is then
+;; installed in a subdirectory of the respective site-lisp directory.
+;; We have to add this to the load-path:
+(let ((package-dir (concat "/usr/share/"
+                           (symbol-name flavor)
+                           "/site-lisp/voyage-util")))
+  (when (file-directory-p package-dir)
+        (setq load-path (cons package-dir load-path))))
+
--- voyage-util-0.6.orig/debian/manpage.1.ex
+++ voyage-util-0.6/debian/manpage.1.ex
@@ -0,0 +1,59 @@
+.\"                                      Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH VOYAGE-UTIL SECTION "June 18, 2006"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+voyage-util \- program to do something
+.SH SYNOPSIS
+.B voyage-util
+.RI [ options ] " files" ...
+.br
+.B bar
+.RI [ options ] " files" ...
+.SH DESCRIPTION
+This manual page documents briefly the
+.B voyage-util
+and
+.B bar
+commands.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+\fBvoyage-util\fP is a program that...
+.SH OPTIONS
+These programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`-').
+A summary of options is included below.
+For a complete description, see the Info files.
+.TP
+.B \-h, \-\-help
+Show summary of options.
+.TP
+.B \-v, \-\-version
+Show version of program.
+.SH SEE ALSO
+.BR bar (1),
+.BR baz (1).
+.br
+The programs are documented fully by
+.IR "The Rise and Fall of a Fooish Bar" ,
+available via the Info system.
+.SH AUTHOR
+voyage-util was written by <upstream author>.
+.PP
+This manual page was written by Punky Tse <punkytse@yahoo.com>,
+for the Debian project (but may be used by others).
--- voyage-util-0.6.orig/debian/manpage.sgml.ex
+++ voyage-util-0.6/debian/manpage.sgml.ex
@@ -0,0 +1,156 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+<!-- Process this file with docbook-to-man to generate an nroff manual
+     page: `docbook-to-man manpage.sgml > manpage.1'.  You may view
+     the manual page with: `docbook-to-man manpage.sgml | nroff -man |
+     less'.  A typical entry in a Makefile or Makefile.am is:
+
+manpage.1: manpage.sgml
+	docbook-to-man $< > $@
+
+    
+	The docbook-to-man binary is found in the docbook-to-man package.
+	Please remember that if you create the nroff version in one of the
+	debian/rules file targets (such as build), you will need to include
+	docbook-to-man in your Build-Depends control field.
+
+  -->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>FIRSTNAME</firstname>">
+  <!ENTITY dhsurname   "<surname>SURNAME</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>June 18, 2006</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>SECTION</manvolnum>">
+  <!ENTITY dhemail     "<email>punkytse@yahoo.com</email>">
+  <!ENTITY dhusername  "Punky Tse">
+  <!ENTITY dhucpackage "<refentrytitle>VOYAGE-UTIL</refentrytitle>">
+  <!ENTITY dhpackage   "voyage-util">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2003</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>program to do something</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+
+      <arg><option>-e <replaceable>this</replaceable></option></arg>
+
+      <arg><option>--example <replaceable>that</replaceable></option></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> and <command>bar</command>
+      commands.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.
+      Instead, it has documentation in the &gnu;
+      <application>Info</application> format; see below.</para>
+
+    <para><command>&dhpackage;</command> is a program that...</para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <para>These programs follow the usual &gnu; command line syntax,
+      with long options starting with two dashes (`-').  A summary of
+      options is included below.  For a complete description, see the
+      <application>Info</application> files.</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>-h</option>
+          <option>--help</option>
+        </term>
+        <listitem>
+          <para>Show summary of options.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>-v</option>
+          <option>--version</option>
+        </term>
+        <listitem>
+          <para>Show version of program.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <para>bar (1), baz (1).</para>
+
+    <para>The programs are documented fully by <citetitle>The Rise and
+      Fall of a Fooish Bar</citetitle> available via the
+      <application>Info</application> system.</para>
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any 
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
+
+
--- voyage-util-0.6.orig/debian/manpage.xml.ex
+++ voyage-util-0.6/debian/manpage.xml.ex
@@ -0,0 +1,148 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+<!--
+
+Process this file with an XSLT processor: `xsltproc \
+-''-nonet /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl manpage.dbk'.  A manual page
+<package>.<section> will be generated.  You may view the
+manual page with: nroff -man <package>.<section> | less'.  A
+typical entry in a Makefile or Makefile.am is:
+
+DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/\
+manpages/docbook.xsl
+XP=xsltproc -''-nonet
+
+manpage.1: manpage.dbk
+        $(XP) $(DB2MAN) $<
+    
+The xsltproc binary is found in the xsltproc package.  The
+XSL files are in docbook-xsl.  Please remember that if you
+create the nroff version in one of the debian/rules file
+targets (such as build), you will need to include xsltproc
+and docbook-xsl in your Build-Depends control field.
+
+-->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>FIRSTNAME</firstname>">
+  <!ENTITY dhsurname   "<surname>SURNAME</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>June 18, 2006</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>SECTION</manvolnum>">
+  <!ENTITY dhemail     "<email>punkytse@yahoo.com</email>">
+  <!ENTITY dhusername  "Punky Tse">
+  <!ENTITY dhucpackage "<refentrytitle>VOYAGE-UTIL</refentrytitle>">
+  <!ENTITY dhpackage   "voyage-util">
+
+  <!ENTITY debian      "<productname>Debian</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+  <!ENTITY gpl         "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2003</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>program to do something</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+
+      <arg><option>-e <replaceable>this</replaceable></option></arg>
+
+      <arg><option>--example <replaceable>that</replaceable></option></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> and <command>bar</command>
+      commands.</para>
+
+    <para>This manual page was written for the &debian; distribution
+      because the original program does not have a manual page.
+      Instead, it has documentation in the &gnu;
+      <application>Info</application> format; see below.</para>
+
+    <para><command>&dhpackage;</command> is a program that...</para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <para>These programs follow the usual &gnu; command line syntax,
+      with long options starting with two dashes (`-').  A summary of
+      options is included below.  For a complete description, see the
+      <application>Info</application> files.</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>-h</option>
+          <option>--help</option>
+        </term>
+        <listitem>
+          <para>Show summary of options.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><option>-v</option>
+          <option>--version</option>
+        </term>
+        <listitem>
+          <para>Show version of program.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <para>bar (1), baz (1).</para>
+
+    <para>The programs are documented fully by <citetitle>The Rise and
+      Fall of a Fooish Bar</citetitle> available via the
+      <application>Info</application> system.</para>
+  </refsect1>
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &dhemail; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the &gnu; General Public License, Version 2 any 
+	  later version published by the Free Software Foundation.
+    </para>
+	<para>
+	  On Debian systems, the complete text of the GNU General Public
+	  License can be found in /usr/share/common-licenses/GPL.
+	</para>
+
+  </refsect1>
+</refentry>
+
--- voyage-util-0.6.orig/debian/menu.ex
+++ voyage-util-0.6/debian/menu.ex
@@ -0,0 +1,2 @@
+?package(voyage-util):needs="X11|text|vc|wm" section="Apps/see-menu-manual"\
+  title="voyage-util" command="/usr/bin/voyage-util"
--- voyage-util-0.6.orig/debian/postinst.ex
+++ voyage-util-0.6/debian/postinst.ex
@@ -0,0 +1,42 @@
+#! /bin/sh
+# postinst script for voyage-util
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+    configure)
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- voyage-util-0.6.orig/debian/postrm.ex
+++ voyage-util-0.6/debian/postrm.ex
@@ -0,0 +1,38 @@
+#! /bin/sh
+# postrm script for voyage-util
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+       purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- voyage-util-0.6.orig/debian/preinst.ex
+++ voyage-util-0.6/debian/preinst.ex
@@ -0,0 +1,38 @@
+#! /bin/sh
+# preinst script for voyage-util
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+#
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install|upgrade)
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- voyage-util-0.6.orig/debian/prerm.ex
+++ voyage-util-0.6/debian/prerm.ex
@@ -0,0 +1,38 @@
+#! /bin/sh
+# prerm script for voyage-util
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
--- voyage-util-0.6.orig/debian/copyright
+++ voyage-util-0.6/debian/copyright
@@ -0,0 +1,10 @@
+This package was debianized by Punky Tse <punkytse@yahoo.com> on
+Sun, 18 Jun 2006 16:53:51 +0800.
+
+It was downloaded from <fill in ftp site>
+
+Copyright Holder: <put author(s) name and email here>
+
+License:
+
+<Put the license of the package here>
--- voyage-util-0.6.orig/debian/control
+++ voyage-util-0.6/debian/control
@@ -0,0 +1,12 @@
+Source: voyage-util
+Section: main
+Priority: optional
+Maintainer: Punky Tse <punkytse@yahoo.com>
+Build-Depends: debhelper (>= 4.0.0)
+Standards-Version: 3.6.1
+
+Package: voyage-util
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: This debian package contains all useful scripts for installing 
+ and configurating voyage linix distribution.
--- voyage-util-0.6.orig/debian/rules
+++ voyage-util-0.6/debian/rules
@@ -0,0 +1,87 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+#configure: configure-stamp
+#configure-stamp:
+#	dh_testdir
+#	# Add here commands to configure the package.
+#
+#	touch configure-stamp
+
+
+build: 
+
+clean:
+	dh_testdir
+	dh_testroot
+	#rm -f build-stamp configure-stamp
+
+	# Add here commands to clean up after the build process.
+	#-$(MAKE) clean
+
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+
+	# Add here commands to install the package into debian/voyage-util.
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/voyage-util
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs Changelog
+	dh_installdocs
+	dh_installexamples
+#	dh_install
+#	dh_installmenu
+#	dh_installdebconf	
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+	dh_installinit -n -r -- "defaults 99"
+#	dh_installcron
+#	dh_installinfo
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+#	dh_python
+#	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+#.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary-arch binary install 
--- voyage-util-0.6.orig/debian/watch.ex
+++ voyage-util-0.6/debian/watch.ex
@@ -0,0 +1,17 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# See uscan(1) for format
+
+# Compulsory line, this is a version 2 file
+version=2
+
+# Uncomment to examine a Webpage 
+# <Webpage URL> <string match>
+#http://www.example.com/downloads.php voyage-util-(.*)\.tar\.gz
+
+# Uncomment to examine a Webserver directory
+#http://www.example.com/pub/voyage-util-(.*)\.tar\.gz
+
+# Uncommment to examine a FTP server
+#ftp://ftp.example.com/pub/voyage-util-(.*)\.tar\.gz debian uupdate
--- voyage-util-0.6.orig/debian/voyage-util.doc-base.EX
+++ voyage-util-0.6/debian/voyage-util.doc-base.EX
@@ -0,0 +1,22 @@
+Document: voyage-util
+Title: Debian voyage-util Manual
+Author: <insert document author here>
+Abstract: This manual describes what voyage-util is
+ and how it can be used to
+ manage online manuals on Debian systems.
+Section: unknown
+
+Format: debiandoc-sgml
+Files: /usr/share/doc/voyage-util/voyage-util.sgml.gz
+
+Format: postscript
+Files: /usr/share/doc/voyage-util/voyage-util.ps.gz
+
+Format: text
+Files: /usr/share/doc/voyage-util/voyage-util.text.gz
+
+Format: HTML
+Index: /usr/share/doc/voyage-util/html/index.html
+Files: /usr/share/doc/voyage-util/html/*.html
+
+  
--- voyage-util-0.6.orig/debian/init.d
+++ voyage-util-0.6/debian/init.d
@@ -0,0 +1,101 @@
+#! /bin/sh
+#
+# skeleton  example file to build /etc/init.d/ scripts.
+#       This file should be used to construct scripts for /etc/init.d.
+#
+#       Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+#       Modified for Debian
+#       by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#
+# Version:  @(#)skeleton  1.9  26-Feb-2001  miquels@cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+#DAEMON=/usr/sbin/voyage-util
+NAME=voyage-util
+DESC=voyage-util
+
+#test -x $DAEMON || exit 0
+
+# Include voyage-util defaults if available
+if [ -f /etc/default/voyage-util ] ; then
+    . /etc/default/voyage-util
+fi
+
+start_leds()
+{
+	if [ $VOYAGE_LEDS == "NO" ] ; then return ; fi
+	
+	if [ ! -f /etc/voyage.conf ] ; then return ; fi
+	. /etc/voyage.conf
+	
+	case $VOYAGE_PROFILE in
+		'WRAP')
+            echo heartbeat > /sys/class/leds/wrap\::power/trigger
+            echo ide-disk > /sys/class/leds/wrap\::error/trigger
+            echo netdev > /sys/class/leds/wrap\:\:extra/trigger
+            echo eth0 > /sys/class/leds/wrap\:\:extra/device_name
+            echo "link tx rx" > /sys/class/leds/wrap\:\:extra/mode			
+			;;
+		'ALIX')
+			echo heartbeat > /sys/class/leds/alix\:1/trigger
+			echo ide-disk > /sys/class/leds/alix\:2/trigger
+			echo netdev > /sys/class/leds/alix\:3/trigger
+		   	echo eth0 > /sys/class/leds/alix\:3/device_name
+   			echo "link tx rx" > /sys/class/leds/alix\:3/mode
+			;;
+		*)
+			;;
+	esac
+}
+
+set -e
+
+case $1 in
+	'start')
+		echo -n "Remounting / as read-write ... "
+		#/bin/mount / -o remount,rw
+		/usr/local/sbin/remountrw
+		echo "Done."
+		if [ -f /voyage.1st ] ; then
+				echo "First-time installation "
+		        echo -n "Re-generating host ssh keys ... "
+				rm -f /etc/ssh/ssh_host_rsa_key
+				ssh-keygen -q -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' || { echo "Fatal Error: Failed to generate RSA keypair" >&2; exit; }
+				rm -f /etc/ssh/ssh_host_dsa_key
+				ssh-keygen -q -t dsa -f /etc/ssh/ssh_host_dsa_key -N '' || { echo "Fatal Error: Failed to generate DSA keypair" >&2; exit; }
+				
+				depmod -ae
+				
+				rm -f /voyage.1st
+				echo "Done."		
+		fi
+		
+		echo -n "Removing /etc/nologin ... "
+		/etc/init.d/rmnologin start
+		echo "Done."
+		echo -n "Remounting / as read-only ... "
+		#/bin/mount / -o remount,ro
+		/usr/local/sbin/remountro
+		echo "Done."		
+		start_leds
+		;;
+	'stop')
+		#if [ -f /etc/voyage.conf ] ; then
+        #	. /etc/voyage.conf
+        #	/usr/local/sbin/remountrw
+        #   	for DIR in $VOYAGE_SYSTEM_SYNCDIRS
+        #   	do
+        #       	echo -n "Synchronizing $DIR ... "
+		#		cp -Rp $DIR/* /ro$DIR/
+		#		echo "Done."
+		#	done
+		#	/usr/local/sbin/remountro           	
+		#fi
+
+		# Do nothing
+		;;
+	*)
+	    ;;
+esac
+
--- voyage-util-0.6.orig/debian/voyage-util.default
+++ voyage-util-0.6/debian/voyage-util.default
@@ -0,0 +1,17 @@
+# Defaults for voyage-util initscript
+# sourced by /etc/init.d/voyage-util
+# installed at /etc/default/voyage-util by the maintainer scripts
+
+#
+# This is a POSIX shell fragment
+#
+
+# Additional options that are passed to the Daemon.
+DAEMON_OPTS=""
+
+# set it to YES to enable LEDS for WRAP/ALIX, NO to disable
+VOYAGE_LEDS="YES"
+
+# apart from /var/tmp and /var/log, add extra directories to sync from tmpfs
+VOYAGE_SYNC_DIRS=""
+
--- voyage-util-0.6.orig/script-utils.sh
+++ voyage-util-0.6/script-utils.sh
@@ -334,3 +334,49 @@
 	VOYAGE_SYSTEM_SERIAL=$w
 	save_config_var VOYAGE_SYSTEM_SERIAL CONFIGLIST
 }
+
+#
+#	Function show_details()
+#	Show the details of the installation information
+#	environment variable: almost all 
+#	Parameters: none
+#
+show_details() {
+	cat >&2 <<EOM
+	
+Configuration details:
+----------------------
+
+Distribution directory:   $DISTDIR
+
+Disk/Flash Device:        $TARGET_DISK
+Installation Partition:   $TARGET_DISK$TARGET_PART
+EOM
+
+	if [ $SYSTEM_BOOTSTRAP == "grub" ]; then
+		cat >&2 <<EOM
+Bootstrap Partition:      $TARGET_DISK$BOOTSTRAP_PART
+EOM
+	fi
+	cat >&2 <<EOM
+
+Will be mounted on:       $TARGET_MOUNT
+
+Target system profile:    $VOYAGE_PROFILE
+Target console:           $VOYAGE_SYSTEM_CONSOLE
+EOM
+	if [ $VOYAGE_SYSTEM_CONSOLE == "serial" ]; then
+		cat >&2 <<EOM
+Target baud rate:         $VOYAGE_SYSTEM_SERIAL
+EOM
+	fi
+	cat >&2 <<EOM
+
+Bootstrap installer:      $SYSTEM_BOOTSTRAP
+EOM
+	if [ $SYSTEM_BOOTSTRAP == grub ]; then
+		cat >&2 <<EOM
+Bootstrap partition:      $TARGET_DISK$BOOTSTRAP_PART
+EOM
+	fi
+}
--- voyage-util-0.6.orig/copyfiles.sh
+++ voyage-util-0.6/copyfiles.sh
@@ -10,12 +10,14 @@
 #  TARGET_PART  The partition on TARGET_DISK for Voyage Linux          #
 #  TARGET_MOUNT The mountpoint for the target disk                     #
 #  BOOTSTRAP_PART If grub, which partition to use                      #
-#                                                                      #
+#  SYSTEM_BOOTSTRAP Which bootstrap loader to use (grub or lilo)       #
+##                                                                     #
 # Additionally, the following variables contain data from the file     #
 # /etc/voyage.conf:                                                    #
 #  VOYAGE_SYSTEM_CONSOLE   system console is 'standard' or 'serial'    #
 #  VOYAGE_SYSTEM_SPEED     if serial, the baud rate                    #
-#  VOYAGE_SYSTEM_BOOTSTRAP Which bootstrap loader to use (grub or lilo)#
+#  VOYAGE_SYSTEM_PCMCIA    if pcmcia is enabled "yes/no"               #
+#  VOYAGE_SYSTEM_MODULES   the module appended to /etc/modules         #
 #                                                                      #
 ########################################################################
 
@@ -55,6 +57,9 @@
 mount -t ext2 $TARGET_DISK$TARGET_PART $TARGET_MOUNT || \
   err_quit "Failed to mount $TARGET_DISK$TARGET_PART on $TARGET_MOUNT as an ext2 partition"
 
+# Mount Ok - Parition correct now set ext2 label to ROOT_FS
+e2label $TARGET_DISK$TARGET_PART ROOT_FS
+
 # We are going to use rsync to copy files from the distribution to the
 # target.  In order to minimise any flash writing, we first figure out
 # any files which we don't want to copy.  First, we check if there is a
@@ -80,6 +85,7 @@
 update_modules "$TARGET_MOUNT"
 update_inittab "$DISTDIR" "$TARGET_MOUNT"
 update_pcmcia "$TARGET_MOUNT"
+remove_dnsmasq_pxe "$TARGET_MOUNT"
 ${EXECDIR}/setboot.sh
 write_config "$TARGET_MOUNT/etc/voyage.conf" "$VOYAGE_CONF_LIST"
 umount $TARGET_MOUNT
--- voyage-util-0.6.orig/setboot.sh
+++ voyage-util-0.6/setboot.sh
@@ -16,13 +16,20 @@
 	
 	# First decide whether console is normal or serial
 	if [ $VOYAGE_SYSTEM_CONSOLE == serial ]; then
+		delay="delay=20"
 		sercmd="serial=0,${VOYAGE_SYSTEM_SERIAL}n8"
 		serapp="console=ttyS0,${VOYAGE_SYSTEM_SERIAL}n8 "
 	else
+		delay="delay=1"
 		sercmd=""
 		serapp=""
 	fi
-	# generate our lilo config file
+	#
+	# Generate our lilo config file
+	# Note that the 'boot', 'disk' and 'bios' params allow us
+	# to run lilo on our host machine, setting up the disk for
+	# our target machine.
+	#
 	cat > $TARGET_MOUNT/etc/lilo.install.conf << EOM
 #
 # This file generated automatically by $0
@@ -31,25 +38,25 @@
 boot = $TARGET_DISK
 disk = $TARGET_DISK
 	bios = 0x80
+$delay
 $sercmd
 vga=normal
-delay=1
 default=Linux
 
 image=/vmlinuz
-	root=/dev/hda$TARGET_PART
 	label=Linux
-		append="${serapp}reboot=bios"
+	initrd=/initrd.img
 	read-only
+	append="root=LABEL=ROOT_FS ${serapp}reboot=bios"
 
 image=/vmlinuz.old
-	root=/dev/hda$TARGET_PART
 	label=LinuxOLD
-		append="${serapp}reboot=bios"
+	initrd=/initrd.img.old
 	read-only
+	append="root=LABEL=ROOT_FS ${serapp}reboot=bios"
 	optional
 EOM
-	sed -e "/disk =/d;/bios =/d" -e "s#${TARGET_DISK}#hda#" \
+	sed -e "/disk =/d;/bios =/d" -e "s#${TARGET_DISK}#/dev/hda#" \
 		$TARGET_MOUNT/etc/lilo.install.conf > \
 		$TARGET_MOUNT/etc/lilo.conf
 }
@@ -58,49 +65,88 @@
 {
 	local liloconf newlilo
 
+	echo "" >&2
+	echo "Running lilo ...." >&2
+	# Generate the configuration file
 	make_lilo_conf
-	chroot $TARGET_MOUNT lilo -C /etc/lilo.install.conf || \
-	  err_quit "Failed to chroot to $MOUNTDISK to install lilo"
+	
+	# Set up /dev and /proc on target to use host devices
+	mount -o bind /dev ${TARGET_MOUNT}/dev
+	mount -o bind /proc ${TARGET_MOUNT}/proc
+	chroot $TARGET_MOUNT lilo -C /etc/lilo.install.conf
+	# Save the exit status, to check after umount'ing device stuff
+	res=$?
+	# Undo the previous 2 mounts
+	umount ${TARGET_MOUNT}/proc
+	umount ${TARGET_MOUNT}/dev
+	# Check the saved exit status
+	if [ $res -ne 0 ]; then
+		err_quit "Failure during chroot to $MOUNTDISK to run lilo"
+	fi
 }
 
 #
-# For a grub install, we try to be clever (maybe too clever?) and check
-# whether the boot partition seems to already have grub installed.  If it
-# does, then we only need to add the current kernel image to the menu.
+# For a grub install, we try check whether the boot partition seems to
+# already have grub installed.  If it does, then we only need to add
+# the current kernel image to the menu.
 #
-# If grub is not yet installed, there is a lot more work to be done :-)
+# If grub is not yet installed, we must install it.
 #
 update_grub()
 {
 	local console datestr fname gp prolog res
+
 	# if the boot partition is separate from the main one,
 	# mount it on $TARGET_MOUNT/rw, otherwise it will be
 	# $TARGET_MOUNT/boot
+	# $ghome is the name relative to the voyage target directory
+	# $gp is the full pathname to where the grub directory is
 	if [ $BOOTSTRAP_PART -ne $TARGET_PART ]; then
-		gp=${TARGET_MOUNT}/rw
-		mount -t ext2 ${TARGET_DISK}${BOOTSTRAP_PART} $gp || \
-		  err_quit "Failed to mount ${TARGET_DISK}${BOOTSTRAP_PART} on $gp"
+		ghome=/rw
+		gp=${TARGET_MOUNT}${ghome}
+		mount ${TARGET_DISK}${BOOTSTRAP_PART} $gp || \
+		  err_quit "Failed to mount ${TARGET_DISK}${BOOTSTRAP_PART}" \
+			   " on $gp"
 	else
-		gp=${TARGET_MOUNT}/boot
+		ghome=/boot
+		gp=${TARGET_MOUNT}${ghome}
 	fi
 	if [ ! -d ${gp}/grub ]; then
 		# create the grub directory in the boot partition
 		mkdir ${gp}/grub
 		# copy the grub files into it
-		cp ${TARGET_MOUNT}/lib/grub/i386-pc/* ${gp}/grub
+		if [ -d ${TARGET_MOUNT}/lib/grub/i386-pc/ ] ; then 
+			cp ${TARGET_MOUNT}/lib/grub/i386-pc/* ${gp}/grub
+		elif [ -d ${TARGET_MOUNT}/usr/lib/grub/i386-pc/ ] ; then 
+			cp ${TARGET_MOUNT}/usr/lib/grub/i386-pc/* ${gp}/grub
+		elif [ -d ${TARGET_MOUNT}/lib/grub/x86_64-pc/ ] ; then 
+			cp ${TARGET_MOUNT}/lib/grub/x86_64-pc/* ${gp}/grub
+		elif [ -d ${TARGET_MOUNT}/usr/lib/grub/x86_64-pc/ ] ; then 
+			cp ${TARGET_MOUNT}/usr/lib/grub/x86_64-pc/* ${gp}/grub
+		else
+			err_quit "Can't find grub files - exiting"
+		fi
 		# create a grub device map for the installation
-		# using a temporary file
-		fname=`mktemp`
-		echo "(hd0) $TARGET_DISK" > $fname
+		dm="/grub/device.map"
+		echo "(hd0) $TARGET_DISK" > ${gp}${dm}
+		# We are going to 'chroot' over to our target, but because
+		# we will be running 'grub' there, we will need the /dev
+		# directory from our current system.
+		mount -o bind /dev $TARGET_MOUNT/dev
+
 		# note the arithmetic evaluation (grub uses '0' as
 		# the first partition)
-		res=`$chroot grub --device-map=$fname <<EOM
+		res=`chroot $TARGET_MOUNT /usr/sbin/grub \
+			--device-map=${ghome}${dm} 2>&1 <<EOM
 setup (hd0) (hd0,$(($BOOTSTRAP_PART-1)))
 quit
 EOM`
 		if [ $? -ne 0 ]; then
+			umount $TARGET_MOUNT/dev
 			err_quit "Trouble running grub - dialog was: $res"
 		fi
+		umount $TARGET_MOUNT/dev
+		rm -f ${gp}${dm}
 	fi
 
 	# common code whether grub already installed or not
@@ -113,6 +159,7 @@
 		prolog=""
 		console=""
 	fi
+	
 	# sanity - if menu.lst doesn't exist, create it
 	# (this will always happen on a new installation)
 	if [ ! -f ${gp}/grub/menu.lst ]; then
@@ -127,6 +174,12 @@
 EOM
 	fi
 
+	# This will test if /initrd.img exist, then grub will enable initrd
+	# and append to menu.lst
+	if [ -f ${TARGET_MOUNT}/initrd.img ] ; then
+		VOYAGE_INITRD="initrd /initrd.img"
+	fi
+
 	# generate a label with today's date
 	# and append to menu.lst
 	datestr=`date +%d%b%y`
@@ -134,7 +187,9 @@
 
 title voyage-linux-$datestr
 root (hd0,$(($TARGET_PART-1)))
-kernel /vmlinuz root=/dev/hda${TARGET_PART}${console}
+kernel /vmlinuz root=LABEL=ROOT_FS ${console}
+${VOYAGE_INITRD}
+
 EOM
 	if [ $BOOTSTRAP_PART -ne $TARGET_PART ]; then
 		umount ${TARGET_DISK}${BOOTSTRAP_PART} || \
@@ -146,11 +201,12 @@
 #    Mainline code starts here                #
 ###############################################
 
-	if [ $VOYAGE_SYSTEM_BOOTSTRAP != grub -a $VOYAGE_SYSTEM_BOOTSTRAP != lilo ]; then
+	if [ $SYSTEM_BOOTSTRAP != grub -a \
+	     $SYSTEM_BOOTSTRAP != lilo ]; then
 		select_target_boot
 	fi
 
-	if [ $VOYAGE_SYSTEM_BOOTSTRAP == lilo ]; then
+	if [ $SYSTEM_BOOTSTRAP == lilo ]; then
 		make_lilo_conf
 		update_lilo
 	else
--- voyage-util-0.6.orig/voyage-install.sh
+++ voyage-util-0.6/voyage-install.sh
@@ -25,6 +25,14 @@
 	if [ "$TARGET_PART" == "" ]; then
 		TARGET_PART=1
 	fi
+	
+	#print a partition info
+	if [ -f /proc/partitions ] ; then
+		echo "Partitions information"
+		cat /proc/partitions
+		echo
+	fi
+	
 	while true
 	do
 		read_response "Which device accesses the target disk [$TARGET_DISK]? " a
@@ -40,10 +48,10 @@
 			a=${a%%[0-9]}
 		fi
 		TARGET_DISK=$a
-		break
-	done
-	while true
-	do
+#		break
+#	done
+#	while true
+#	do
 		read_response "Which partition should I use on $TARGET_DISK for the Voyage system [$TARGET_PART]? " a
 		a=${a:-$TARGET_PART}
 		if [ ! -b $TARGET_DISK$a ]; then
@@ -53,6 +61,18 @@
 		TARGET_PART=$a
 		break
 	done
+	
+	#print a device info
+	if [ -f /lib/udev/vol_id ] ; then
+		echo "Device information for $TARGET_DISK$a"
+		echo "    Type  = $(/lib/udev/vol_id -t $TARGET_DISK$a)"
+		echo "    Label = $(/lib/udev/vol_id -l $TARGET_DISK$a)"
+		echo "    UUID  = $(/lib/udev/vol_id -u $TARGET_DISK$a)"
+		echo ""
+	fi
+	
+	
+	if [ -d /tmp/cf ] ; then TARGET_MOUNT="/tmp/cf" ; fi
 	while true
 	do
 		read_response "Where can I mount the target disk [$TARGET_MOUNT]? " a
@@ -73,23 +93,23 @@
 #
 #	Function select_target_boot()
 #	Selects which bootstrap loader to us
-#	Sets the environment variable VOYAGE_SYSTEM_BOOTSTRAP
+#	Sets the environment variable SYSTEM_BOOTSTRAP
 #	with the result
 #
 select_target_boot() {
 	local a
 	while true
 	do
-		read_response "Which loader do you want (grub or lilo) [$VOYAGE_SYSTEM_BOOTSTRAP]? " a
-		a=${a:-$VOYAGE_SYSTEM_BOOTSTRAP}
+		read_response "Which loader do you want (grub or lilo) [$SYSTEM_BOOTSTRAP]? " a
+		a=${a:-$SYSTEM_BOOTSTRAP}
 		if [ "$a" != "grub" -a "$a" != "lilo" ]; then
 			err_msg "Invalid response '$a' - must be 'grub' or 'lilo'"
 			continue
 		fi
-		VOYAGE_SYSTEM_BOOTSTRAP=$a
+		SYSTEM_BOOTSTRAP=$a
 		break
 	done
-	if [ $VOYAGE_SYSTEM_BOOTSTRAP == "grub" ]; then
+	if [ $SYSTEM_BOOTSTRAP == "grub" ]; then
 		while true
 		do
 			read_response "Which partition is used for bootstrap [$BOOTSTRAP_PART]? " a
@@ -103,8 +123,8 @@
 			break
 		done
 	fi
-	save_config_var VOYAGE_SYSTEM_BOOTSTRAP VOYAGE_CONF_LIST
-	save_config_var VOYAGE_SYSTEM_BOOTSTRAP CONFIGLIST
+	save_config_var SYSTEM_BOOTSTRAP VOYAGE_CONF_LIST
+	save_config_var SYSTEM_BOOTSTRAP CONFIGLIST
 }
 
 #
@@ -143,13 +163,13 @@
 	if [ -z "$TARGET_DISK" -o -z "$TARGET_PART" -o -z "$TARGET_MOUNT" ]; then
 		select_target_disk
 	fi
-	if [ -z "$VOYAGE_SYSTEM_BOOTSTRAP" ]; then
+	if [ -z "$SYSTEM_BOOTSTRAP" ]; then
 		select_target_boot
-	elif [ $VOYAGE_SYSTEM_BOOTSTRAP != grub -a $VOYAGE_SYSTEM_BOOTSTRAP != lilo ]; then
+	elif [ $SYSTEM_BOOTSTRAP != grub -a $SYSTEM_BOOTSTRAP != lilo ]; then
 		select_target_boot
 	fi
 	
-	if [ $VOYAGE_SYSTEM_BOOTSTRAP == "grub" -a -z "$BOOTSTRAP_PART" ]; then
+	if [ $SYSTEM_BOOTSTRAP == "grub" -a -z "$BOOTSTRAP_PART" ]; then
 		BOOTSTRAP_PART=$TARGET_PART
 		save_config_var BOOTSTRAP_PART CONFIGLIST
 	fi
@@ -171,7 +191,7 @@
 Installation Partition:   $TARGET_DISK$TARGET_PART
 EOM
 
-	if [ $VOYAGE_SYSTEM_BOOTSTRAP == "grub" ]; then
+	if [ $SYSTEM_BOOTSTRAP == "grub" ]; then
 		cat >&2 <<EOM
 Bootstrap Partition:      $TARGET_DISK$BOOTSTRAP_PART
 EOM
@@ -190,9 +210,9 @@
 	fi
 	cat >&2 <<EOM
 
-Bootstrap installer:      $VOYAGE_SYSTEM_BOOTSTRAP
+Bootstrap installer:      $SYSTEM_BOOTSTRAP
 EOM
-	if [ $VOYAGE_SYSTEM_BOOTSTRAP == grub ]; then
+	if [ $SYSTEM_BOOTSTRAP == grub ]; then
 		cat >&2 <<EOM
 Bootstrap partition:      $TARGET_DISK$BOOTSTRAP_PART
 EOM
@@ -229,6 +249,18 @@
 	err_quit "Script can only be run by root"
 fi
 
+# This attempts to set the default values
+#DISTDIR=`pwd`
+VOYAGE_PROFILE=ALIX
+TARGET_DISK=/dev/hde
+TARGET_PART=1
+TARGET_MOUNT=/mnt/cf
+BOOTSTRAP_PART=1
+SYSTEM_BOOTSTRAP=grub
+
+VOYAGE_SYSTEM_SERIAL=38400
+VOYAGE_SYSTEM_CONSOLE=serial
+
 # The logic here is a little confusing.  Basically, we may or may
 # not have a stored $CONFIGFILE [.voyage-install.conf] which
 # contains data saved from previous invocations.  If we do have it,
@@ -258,7 +290,7 @@
 
 # This next test should never happen, but who knows :-)
 if [ -z $VOYAGE_PROFILE ]; then
-	VOYAGE_PROFILE=WRAP	# default is WRAP
+	VOYAGE_PROFILE=ALIX	# default is ALIX
 	save_config_var VOYAGE_PROFILE VOYAGE_CONF_LIST
 fi
 
@@ -267,11 +299,16 @@
 
 # here we define the different choices which can be made by the user
 OPTIONS="Specify Distribution Directory%Select Target Profile%Select Target Disk%Select Target Bootstrap Loader%Configure Target Console%Copy Distribution to Target%Exit"
+opt=1
 while true
 do
-	# Work starts here.  The default is set to "Copy Distribution"
-	ask_setting "What would you like to do?" "$OPTIONS" 7
-
+    opt=$((opt + 1))
+    if [ $opt -ge 7 ] ; then opt=7 ; fi
+    
+    # Work starts here.  The default is set to "2" at first
+    #ask_setting "What would you like to do?" "$OPTIONS" 7
+    ask_setting "What would you like to do?" "$OPTIONS" $opt
+    opt=$v
 	case $v in
 		1) ask_work_dir $DISTDIR "distribution";
 		   DISTDIR=$w;;
--- voyage-util-0.6.orig/overlay_fs/usr/local/sbin/fastreboot
+++ voyage-util-0.6/overlay_fs/usr/local/sbin/fastreboot
@@ -0,0 +1,3 @@
+#!/bin/sh
+/usr/local/sbin/remountro
+reboot -d -f -i
--- voyage-util-0.6.orig/overlay_fs/usr/local/sbin/format-cf.sh
+++ voyage-util-0.6/overlay_fs/usr/local/sbin/format-cf.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+if [ -z $1 ] ; then
+	echo "$0 <device>"
+	exit
+fi
+
+echo "Press ENTER to continue to format flash memory on $1"
+read a
+
+DEV=$1
+#[ -b $DEV ] && fdisk $DEV < `dirname $0`/fdisk.cmd
+[ -b $DEV ] && fdisk $DEV <<EOF
+o
+n
+p
+1
+
+
+a
+1
+w
+EOF
+[ -b "$DEV"1 ] && mkfs.ext2 "$DEV"1 
+[ -b "$DEV"1 ] && tune2fs -i 0 -c 0 "$DEV"1 -L ROOT_FS
--- voyage-util-0.6.orig/overlay_fs/usr/local/sbin/mount-proc.sh
+++ voyage-util-0.6/overlay_fs/usr/local/sbin/mount-proc.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+mount -t proc none /proc
+$@
+umount /proc
--- voyage-util-0.6.orig/overlay_fs/usr/local/sbin/nat.sh
+++ voyage-util-0.6/overlay_fs/usr/local/sbin/nat.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+if [ -z $1 ] || [ -z $2 ] || [ -z $3 ] ; then
+        echo "$0 <nat device> <output device> <network address>"
+        exit
+fi
+
+iptables -t nat -N "$1"-NAT 2>/dev/null
+iptables -t nat -F "$1"-NAT
+iptables -t nat -D POSTROUTING -j "$1"-NAT 2>/dev/null
+iptables -t nat -A POSTROUTING -j "$1"-NAT
+iptables -t nat -D "$1"-NAT -j MASQUERADE 2>/dev/null
+iptables -t nat -A "$1"-NAT -o "$2" -s "$3" -j MASQUERADE
+
+# Testing : used for integration with nocat
+iptables -N "$1"-FORWARD 2>/dev/null
+iptables -F "$1"-FORWARD
+iptables -D "$1"-FORWARD -j ACCEPT -s "$3" 2>/dev/null
+iptables -A "$1"-FORWARD -j ACCEPT -s "$3"
+
+iptables -D FORWARD -j "$1"-FORWARD -s "$3" 2>/dev/null
+iptables -I FORWARD 1 -j "$1"-FORWARD -s "$3"
+
+iptables -N "$1"-INBOUND 2>/dev/null
+iptables -F "$1"-INBOUND
+iptables -D "$1"-INBONUD -j ACCEPT -d "$3" 2>/dev/null
+iptables -A "$1"-INBOUND -j ACCEPT -d "$3"
+
+iptables -D FORWARD -j "$1"-INBOUND -d "$3" 2>/dev/null
+iptables -I FORWARD 1 -j "$1"-INBOUND -d "$3"
\ No newline at end of file
--- voyage-util-0.6.orig/overlay_fs/usr/local/sbin/remountro
+++ voyage-util-0.6/overlay_fs/usr/local/sbin/remountro
@@ -0,0 +1,4 @@
+#!/bin/sh
+sync
+sleep 1
+mount -o remount,ro /
--- voyage-util-0.6.orig/overlay_fs/usr/local/sbin/remountrw
+++ voyage-util-0.6/overlay_fs/usr/local/sbin/remountrw
@@ -0,0 +1,2 @@
+#!/bin/sh
+mount -o remount,rw,noatime /
--- voyage-util-0.6.orig/overlay_fs/usr/local/sbin/remove.docs
+++ voyage-util-0.6/overlay_fs/usr/local/sbin/remove.docs
@@ -0,0 +1,23 @@
+#!/bin/sh
+rm -rf /usr/share/doc/*
+rm -rf /usr/share/man/*
+rm -rf /var/lib/apt/lists/security*
+rm -rf /var/lib/apt/lists/debian*
+rm -f /var/cache/apt/pkgcache.bin /var/cache/apt/srcpkgcache.bin
+rm -f /var/lib/dpkg/available-old /var/lib/dpkg/status-old
+rm -f /var/cache/debconf/config.dat-old /var/cache/debconf/templates.dat-old
+
+apt-get clean > /dev/null
+#find /var/lib/apt/lists -type f \( -name "*Packages" -o -name "*Sources" \)  -exec rm -f '{}' ';' -exec touch '{}' ';' 2>/dev/null
+find /var/lib/apt/lists -type f \( -name "*Packages*" -o -name "*Sources*" -o -name "*Release*" \)  -exec rm -f '{}' ';' 2>/dev/null
+dpkg --clear-avail > /dev/null
+rm -f /var/cache/apt/*.bin > /dev/null
+apt-cache gencaches > /dev/null
+
+find /usr/share/locale -name "*.mo" -exec rm '{}' ';'  2>/dev/null
+find /usr/share/ -name "*.info.gz" -exec rm '{}' ';'  2>/dev/null
+find /usr/share/locale -path '*/en' -mindepth 1 -maxdepth 2 -prune -o -print 	-exec rm -rf '{}' ';' 2>/dev/null >/dev/null
+rm -f /var/lib/dpkg/info/*.md5sums
+#rm -f /var/lib/dpkg/info/*.postinst
+
+rm -f /boot/*.bmp
--- voyage-util-0.6.orig/overlay_fs/usr/local/sbin/voyage-configure.sh
+++ voyage-util-0.6/overlay_fs/usr/local/sbin/voyage-configure.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#################################################################
+#
+# voyage-configure.sh
+#
+#################################################################
+
+if [ ! -f /etc/voyage.conf ] ; then
+	echo "voyage.conf not found"
+fi
+
+. /etc/voyage.conf
+
+# VOYAGE_SYSTEM_PCMCIA 
+if [ "$VOYAGE_SYSTEM_PCMCIA" == "yes" ] ; then
+	update-rc.d pcmcia defaults 20 >&2
+else
+	update-rc.d -f pcmcia remove  >&2
+fi
+
+# VOYAGE_SYSTEM_SERIAL
+if [ "$VOYAGE_SYSTEM_SERIAL" == "" ] ; then
+	sed -i -e "/^#[0-9]/ s/^#//" -e "s/^T0:/#T0:/" /etc/inittab
+else
+	sed -i -e "/^[0-9]:/ s/^/#/" -e "s/^#T0:/T0:/" /etc/inittab
+fi
--- voyage-util-0.6.orig/overlay_fs/usr/local/sbin/trafmon
+++ voyage-util-0.6/overlay_fs/usr/local/sbin/trafmon
@@ -0,0 +1,293 @@
+#!/usr/bin/perl -wT
+use strict;
+
+$ENV{"PATH"} = "";
+
+sub helpmsg ();
+my @prg = split /\//, $0;
+my $prg = $prg[-1];
+
+##rqd programs.
+if((!(-x '/usr/bin/sqlite3' ))||(!(-x '/usr/sbin/tcpdump'))) {
+	print "\n    sqlite3 or tcpdump not installed. These are required by $prg.\n";
+	exit();
+}
+
+##number of command line options
+if($#ARGV < 0) {
+	print "$#ARGV Number of arguments error.";
+	helpmsg ();
+	exit ();
+}
+
+##interface
+my $intstr1 = `/sbin/ip link show`;
+$intstr1 =~ s/\n/:::/g;
+$intstr1 =~ s/\s+/\ /g;
+my @intstr1 = split /:::/, $intstr1;
+my $intcount1 = @intstr1 / 2;
+my $interface; my @str; my @pro;
+foreach my $int (0..($intcount1 - 1)) {
+ 	@str = split /:\s/, $intstr1[($int * 2)];
+	@pro = split /\s/, $intstr1[($int * 2 + 1)];
+	if(($str[1] eq $ARGV[0]) && ($pro[1] eq 'link/ether')) {
+		$interface = $str[1];
+		last;
+	}elsif($int == ($intcount1 - 1)){
+		print "\nNo matching ethernet interface.\n";
+		helpmsg ();
+		exit();
+	} 
+}
+
+my $select; my $groupby='', my $bysadd='', my $bysport='', my $bydadd='', my $bydport='', my $byproto='', my $grpbyset=0, my @hol;
+my $i=0;
+foreach my $int (1 .. $#ARGV) {
+	if ($ARGV[$int] eq 'src-addr' ) {
+		$hol[$i] = 'a';
+		$i = $i + 1;
+	}elsif ($ARGV[$int] eq 'src-port' ) {
+		$hol[$i] = 'b';
+		$i = $i + 1;
+	}elsif ($ARGV[$int] eq 'dst-addr' ) {
+		$hol[$i] = 'c';
+		$i = $i + 1;
+	}elsif ($ARGV[$int] eq 'dst-port' ) {
+		$hol[$i] = 'd';
+		$i = $i + 1;
+	}elsif ($ARGV[$int] eq 'proto' ) {
+		$hol[$i] = 'e';
+		$i = $i + 1;
+	}else{
+		print "\nUnknown option: $ARGV[$int]\n";
+		helpmsg ();
+		exit();
+	}
+}
+my $sa=''; my $sp=''; my $da=''; my $dp=''; my $pr='';
+@hol = sort(@hol);
+foreach my $int (@hol) {
+	if ($int eq 'a' ) {
+		if($grpbyset == 1) { 
+			$bysadd = ', sadd';
+		}else{
+			$bysadd = 'sadd';
+			$grpbyset = 1;
+		}
+		$sa = '2 ';
+		next;
+	}elsif($int eq 'b' ) {
+		if($grpbyset == 1) { 
+			$bysport = ', sport';
+		}else{
+			$bysport = 'sport';
+			$grpbyset = 1;
+		}
+		$sp = '3 ';
+		next;
+	}elsif($int eq 'c' ) {
+		if($grpbyset == 1) { 
+			$bydadd = ', dadd';
+		}else{
+			$bydadd = 'dadd';
+			$grpbyset = 1;
+		}
+		$da = '2 ';
+		next;
+	}elsif($int eq 'd' ) {
+		if($grpbyset == 1) { 
+			$bydport = ', dport';
+		}else{
+			$bydport = 'dport';
+			$grpbyset = 1;
+		}
+		$dp = '3 ';
+		next;
+	}elsif($int eq 'e' ) {
+		if($grpbyset == 1) { 
+			$byproto = ', proto';
+		}else{
+			$byproto = 'proto';
+			$grpbyset = 1;
+		}
+		$pr = '3 ';
+		next;
+	}else{
+		helpmsg ();
+		exit();
+	}
+}
+my $header = "tx rx $bysadd$bysport$bydadd$bydport$byproto";
+$header =~ s/\,+//g;
+my @header = split /\s+/, $header;
+my $select1 = "$bysadd$bysport$bydadd$bydport$byproto";
+if($select1 eq '') {
+	$select = "SELECT sum(tx), sum(rx)";
+	$groupby = "ORDER BY sum(rx) DESC";
+}else{
+	$select = "SELECT sum(tx), sum(rx), $bysadd$bysport$bydadd$bydport$byproto";
+	$groupby = "GROUP BY $bysadd$bysport$bydadd$bydport$byproto ORDER BY sum(rx) DESC"; 
+}
+my $size1 = "1 1 $sa$sp$da$dp$pr";
+my @size = split /\s+/, $size1;
+my $hdcnt = @size;
+##my $path = myfile;
+my @l, my $trans = 0, my $period = 2, my $llen = 0;
+my @label = ('tx:', 'rx:', 'src-addr:', 'src-port:', 'dst-addr:', 'dst-port:', 'proto:');
+my $sqlstr = '';
+#dangerously untaint
+$interface =~ /(.*)/;
+$interface = $1;
+my $if = `/sbin/ifconfig $interface`;
+my @if = split /\s+/, $if;
+my $ins = 0;
+my $wcount =0;
+my $ifcount = 0;
+my $tint =  `/bin/date +%s.%N`;
+chomp($tint);
+
+my $fl = "/rw/var/trafmondb";
+if(!( -f $fl )) {
+	(`/usr/bin/sqlite3 /rw/var/trafmondb "CREATE TABLE 'tcpDump' ('time', 'tx', 'rx', 'sadd', 'sport', 'dadd', 'dport', 'proto');"`); 
+}
+
+open (PO, "/usr/sbin/tcpdump -lpttqnve -i $interface |") or die "Can't run tcpdump: $!\n";
+
+while(1) {
+	#$wcount = $wcount + 1;
+	if (defined(my $tcpout = <PO>)) {
+		chomp($tcpout);
+		if($tcpout =~ /\ IP\ \(tos/i ) {
+			$tcpout =~ s/\ IP\ \(tos/\ \(tos/;
+			if($tcpout =~ /tcp/i ) {
+				$tcpout =~ s/\[DF\],/\[DF\],\ proto\:\ TCP\ \(x\),/;
+			}elsif($tcpout =~ /udp/i ){
+				$tcpout =~ s/\[DF\],/\[DF\],\ proto\:\ UDP\ \(x\),/;
+			}elsif($tcpout =~ /icmp/i ) {
+				$tcpout =~ s/\[DF\],/\[DF\],\ proto\:\ ICMP\ \(x\),/; ##print "$tcpout \n\n";
+				$tcpout =~ s/\[none\],/\[DF\],\ proto\:\ ICMP\ \(x\),/; ##print "$tcpout \n\n";
+			}
+		}
+		my $proto = '', my $sport = '', my $dport = '', my $tx = 0, my $rx = 0;
+		my @src, my $src, my @dst, my $dst, my $inter, my $interp;
+		@l = split /\s+/, $tcpout;
+		$llen = @l;
+		if($llen > 24 ) {
+			$l[13] =~ s/\)//g;
+			$l[22] =~ s/\://g;
+			$l[24] =~ s/\://g;
+			$proto = $l[18];
+		}
+		$ins = 0;
+		if(($proto =~ /udp/i ) || ($proto =~ /tcp/i) || ($proto =~ /icmp/i)) {
+			##print "\n\n $proto, @l \n\n";
+			$ins = 1;
+			@src = split /\./, $l[22];
+			@dst = split /\./, $l[24];
+			$src = @src;
+			$dst = @dst;
+			$sport = "-";
+			$dport = "-";
+			if ($src == 5) {
+				$l[22] = "$src[0].$src[1].$src[2].$src[3]";
+				$sport = "$src[4]";
+			}
+			if ($dst == 5) {
+				$l[24] = "$dst[0].$dst[1].$dst[2].$dst[3]";
+				$dport = "$dst[4]";
+			}
+			if (($l[23] =~ /udp/i) || (($l[23] =~ /bad/ ) && ($l[24] =~ /udp/))) {
+				$l[23] = 'udp';
+			}
+			$l[6] =~ s/\://g;
+			if ($l[1] =~ /$if[4]/i ) {
+				$tx = $l[6];
+				$rx = 0;
+			}else{
+				$tx = 0;
+				$rx = $l[6];
+				$inter = $l[22];
+				$interp = $sport;
+				$l[22] = $l[24];
+				$l[24] = $inter;
+				$sport = $dport;
+				$dport = $interp;
+			}
+		}
+		if($ins == 1) {
+			$sqlstr = "$sqlstr INSERT INTO 'tcpDump' VALUES('$l[0]', '$tx', '$rx', '$l[22]', '$sport', '$l[24]', '$dport', '$proto')\;";
+			$ins = 0;
+		}
+	}else{
+			print "i am sleeping.............\n\n";
+			`/bin/sleep 0.05`;
+	}
+	if((time() - $tint) > $period) {
+		my $go = 0;
+		my $data = '';
+		####untaint, actually doing nothing
+		$sqlstr =~ /(.*)/; $sqlstr = $1; $select =~ /(.*)/; $select = $1;
+		$data = (`/usr/bin/sqlite3 /rw/var/trafmondb "BEGIN TRANSACTION; $sqlstr $select FROM tcpDump $groupby"`);
+		$go = 1;
+		$sqlstr = '';
+		my $pactual = (`/bin/date +%s.%N`) - $tint; ##$period;
+		my @data = split /\n/, $data;
+		my $n = @data;
+		print "\n\n";
+		my $k = 0;
+		foreach $k (0..($hdcnt - 1)) {
+			if($size[$k] == 1) {
+				printf("%12s ", $header[$k]);
+			}elsif($size[$k]== 2) {
+				printf("%18s ", $header[$k]);
+			}elsif($size[$k] == 3) {
+				printf("%8s ", $header[$k]);
+			}
+		}
+		print "\n";
+		my $j = 0;
+		foreach $j (0..$n-1) {
+			my @fields = split /\|/, $data[$j];
+			my $m = @fields;
+			foreach $i (0..$m-1) {
+				my $units = 'bps';
+				if(($i == 0) || ($i == 1)) {
+					if(($fields[$i] * 8 / $pactual) > 1024 ) {
+						$fields[$i] = (($fields[$i] * 8 ) / ($pactual * 1024));
+						$units = 'Kbps';
+						if($fields[$i] > 1024 ) {
+							$fields[$i] = ($fields[$i] / 1024);
+							$units = 'Mbps';
+						}
+					}else{
+						$fields[$i] = ($fields[$i] * 8 / $pactual );
+					}
+				}
+				if($size[$i] == 1) {
+					printf("%7.1f %4s ", $fields[$i], $units);
+				}elsif($size[$i] == 2) {
+					printf("%18s ", $fields[$i]);
+				}elsif($size[$i] == 3) {
+					printf("%8s ", $fields[$i]);
+				}
+			}
+			print"\n";
+		}
+		$tint = `/bin/date +%s.%N`;
+	}
+}
+sub helpmsg ()  {
+		print "\n\nFormat of program is:\n";
+		print "    $prg interface [sadd src-port dadd dst-port proto]\n";
+		print "    interface is the name of an Ethernet Interface, it is required. Eg: eth0\n";
+		print "\nOptional parameters\n";
+		print "    src-addr will cause $prg to display source ip addresses.\n";
+		print "    src-port will cause $prg to display source port addresses.\n";
+		print "    dst-addr will cause $prg to display destination ip addresses.\n";
+		print "    dst-port will cause $prg to display destination port addresses.\n";
+		print "    proto will cause $prg to display protocols. Only tcp, udp and icmp are supported.\n";
+		print "Examples:\n";
+		print "    $prg eth0\n";
+		print "    $prg eth0 src-addr\n";
+		print "    $prg eth0 src-addr dst-port proto\n";
+}
--- voyage-util-0.6.orig/overlay_fs/etc/init.d/voyage-pxe
+++ voyage-util-0.6/overlay_fs/etc/init.d/voyage-pxe
@@ -0,0 +1,105 @@
+#! /bin/sh
+#
+# skeleton  example file to build /etc/init.d/ scripts.
+#       This file should be used to construct scripts for /etc/init.d.
+#
+#       Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+#       Modified for Debian
+#       by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#
+# Version:  @(#)skeleton  1.9  26-Feb-2001  miquels@cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+NAME=voyage-pxe
+DESC=voyage-pxe
+
+#test -x $DAEMON || exit 0
+
+# Include voyage-util defaults if available
+if [ -f /etc/default/voyage-util ] ; then
+    . /etc/default/voyage-util
+fi
+
+set -e
+
+PXEDEFAULT=/tftpboot/pxelinux.cfg/default
+INITTAB=/etc/inittab
+case $1 in
+	'start')
+		SERIAL=$2
+		if [ ! -z $SERIAL ] ; then
+		
+			if [ "$SERIAL" == "0" ] ; then
+				echo -n "Setting console display... "
+				if [ ! -f $PXEDEFAULT.pxe ] ; then cp $PXEDEFAULT $PXEDEFAULT.pxe ; fi
+				sed -i -e "s/console 0/console 1/" $PXEDEFAULT 
+				sed -i -e "/^serial/ D" $PXEDEFAULT 
+				sed -i -e "s/ console.*$//" $PXEDEFAULT 
+				echo "Done."
+			else
+				echo -n "Setting serial $SERIAL to $INITTAB ... "
+				if [ ! -f $INITTAB.pxe ] ; then cp $INITTAB $INITTAB.pxe ; fi
+				sed -i -e "s/9600/${SERIAL}/" $INITTAB 
+				echo "Done."
+				
+				echo -n "Setting serial $SERIAL to $PXEDEFAULT ... "
+				if [ ! -f $PXEDEFAULT.pxe ] ; then cp $PXEDEFAULT $PXEDEFAULT.pxe ; fi
+				sed -i -e "s/9600/${SERIAL}/" $PXEDEFAULT 
+				echo "Done."
+			fi
+		else
+			echo "No serial setting is supplied, using 9600"
+		fi
+		
+		echo -n "Setting up eth0 to 192.168.1.200 ... "
+		ifdown eth0
+		ifconfig eth0 192.168.1.200 netmask 255.255.255.0 up 
+		echo "Done."
+		
+		#echo -n "mounting /media ... "
+		#mount -o loop /live/image/live/filesystem.squashfs /media
+		
+		#if [ ! -d /filesystem.squashfs ] ; then mkdir /filesystem.squashfs ; fi
+		#mount -o loop /live_media/casper/filesystem.squashfs /filesystem.squashfs
+		#mount -n -t unionfs -o dirs=/cow=rw:/filesystem.squashfs=ro unionfs /media
+		#echo "Done."
+		
+		#/etc/init.d/nfs-user-server restart
+		/etc/init.d/nfs-kernel-server restart
+		/etc/init.d/atftpd restart
+		;;
+	'stop')
+		#/etc/init.d/nfs-user-server stop
+		/etc/init.d/nfs-kernel-server stop
+		/etc/init.d/atftpd stop
+		
+		#echo -n "Un-mounting /media ... "
+		#umount /media
+		#umount /filesystem.squashfs
+		#echo "Done."
+		
+		echo -n "Restoring eth0 ... "
+		ifconfig eth0 down	
+		ifup eth0		
+		echo "Done."
+		
+		echo -n "Restoring $INITTAB ... "
+		if [ -f $INITTAB.pxe ] ; then 
+			mv $INITTAB.pxe $INITTAB
+		fi
+		echo "Done."
+		
+		echo -n "Restoring $PXEDEFAULT ... "
+		if [ -f $PXEDEFAULT.pxe ] ; then 
+			mv $PXEDEFAULT.pxe $PXEDEFAULT
+		fi
+		echo "Done."
+		;;
+	*)
+		echo "Usage: `basename $0` {start <serial rate>|stop}"
+		exit 1
+	    ;;
+esac
+
+exit 0
--- voyage-util-0.6.orig/overlay_fs/etc/init.d/voyage-sync
+++ voyage-util-0.6/overlay_fs/etc/init.d/voyage-sync
@@ -0,0 +1,112 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          voyage-sync
+# Required-Start:    
+# Required-Stop:     
+# Default-Start:     S
+# Default-Stop:      0 6
+# Short-Description: Voyage tmpfs and sync
+### END INIT INFO
+#
+# skeleton  example file to build /etc/init.d/ scripts.
+#       This file should be used to construct scripts for /etc/init.d.
+#
+#       Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+#       Modified for Debian
+#       by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#
+# Version:  @(#)skeleton  1.9  26-Feb-2001  miquels@cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+#DAEMON=/usr/sbin/voyage-sync
+NAME=voyage-sync
+DESC=voyage-sync
+
+TMPFS_ROOT=/lib/init/rw
+SYNC_DIRS="var/log var/tmp"
+
+# using the following commands to install
+#	
+#	update-rc.d voyage-sync start 36 S . stop 99 0 6 .
+
+if [ -f /etc/default/voyage-util ] ; then 
+	. /etc/default/voyage-util; 
+fi
+SYNC_DIRS="$SYNC_DIRS $VOYAGE_SYNC_DIRS"
+UNIONFS=${VOYAGE_UNIONFS:=aufs}
+
+mount_dirs()
+{
+	# $1 : aufs|unionfs|tmpfs
+	# $2 : source directory
+	# $3 : target directory
+	case $1 in
+		'aufs')
+			PERM=$(stat --format=%U:%G $2)
+			chmod --reference=$2 $3
+			chown --reference=$2 $3
+			mount -t aufs -o dirs=$3:$2=ro none $2> /dev/null 2>&1
+			#echo "chown $PERM $2"
+			chown $PERM $2
+			;;
+		'unionfs')
+			PERM=$(stat --format=%U:%G $2)
+			chmod --reference=$2 $3
+			chown --reference=$2 $3
+			mount -t unionfs -o dirs=$3:$2=ro none $2> /dev/null 2>&1
+			#echo "chown $PERM $2"
+			chown $PERM $2
+			;;
+		'tmpfs')
+			echo not implemented
+			;;
+		*)
+	    	;;
+	esac
+}
+
+case $1 in
+	'start')
+		echo "Voyage is now setting up tmpfs for changed files..."
+		
+		for SYNC_DIR in $SYNC_DIRS; do
+			[ ! -d $TMPFS_ROOT/$SYNC_DIR ] && mkdir -p $TMPFS_ROOT/$SYNC_DIR			
+			
+			mount_dirs $UNIONFS /$SYNC_DIR $TMPFS_ROOT/$SYNC_DIR
+			
+			#chmod --reference=/$SYNC_DIR $TMPFS_ROOT/$SYNC_DIR
+			#chown --reference=/$SYNC_DIR $TMPFS_ROOT/$SYNC_DIR			
+			#mount -t aufs -o dirs=$TMPFS_ROOT/$SYNC_DIR:$SYNC_DIR=ro none /$SYNC_DIR> /dev/null 2>&1
+		done
+		echo "Done."
+		;;
+	'stop')
+		echo "Voyage is now synchroning changed files..."
+		[ -f /usr/local/sbin/remountrw ] && /usr/local/sbin/remountrw
+		for SYNC_DIR in $SYNC_DIRS; do
+			if [ ! -d /.sync/$SYNC_DIR ] ; then
+                                mkdir -p /.sync/$SYNC_DIR
+                                PERM=$(stat --format=%U:%G /$SYNC_DIR)
+                                chown $PERM /.sync/$SYNC_DIR
+                        fi
+			
+			echo "  Sync'ing /$SYNC_DIR to `dirname /$SYNC_DIR`	"
+
+			rsync -a -q --delete-after /$SYNC_DIR/* /.sync/$SYNC_DIR
+			umount /$SYNC_DIR		
+			
+			rsync -a -q --delete-after /.sync/$SYNC_DIR `dirname /$SYNC_DIR`			
+
+			#PERM=$(stat --format=%U:%G $SYNC_DIR)
+                        #echo "owner $PERM $SYNC_DIR"
+		done
+		
+		# at last remove /.sync
+		rm -rf /.sync
+		echo "Done."
+		;;
+	*)
+	    ;;
+esac
+
--- voyage-util-0.6.orig/overlay_fs/etc/dnsmasq.more.conf
+++ voyage-util-0.6/overlay_fs/etc/dnsmasq.more.conf
@@ -0,0 +1,5 @@
+dhcp-range=wlan0,10.1.10.10,10.1.10.250,24h
+dhcp-range=eth1,10.1.20.10,10.1.20.250,24h
+dhcp-range=eth2,10.1.30.10,10.1.30.250,24h
+dhcp-range=eth3,10.1.40.10,10.1.40.250,24h
+dhcp-leasefile=/var/tmp/dnsmasq.leases
--- voyage-util-0.6.orig/overlay_fs/etc/voyage.conf
+++ voyage-util-0.6/overlay_fs/etc/voyage.conf
@@ -0,0 +1,12 @@
+#####################################################################
+#
+# voyage.conf - voyage configuration file
+#
+#####################################################################
+
+VOYAGE_PROFILE=WRAP
+
+VOYAGE_SYSTEM_SERIAL=38400
+VOYAGE_SYSTEM_PCMCIA=yes
+
+VOYAGE_SYSTEM_SYNCDIRS="/var/run /var/spool"
--- voyage-util-0.6.orig/overlay_fs/etc/motd.voyage
+++ voyage-util-0.6/overlay_fs/etc/motd.voyage
@@ -0,0 +1,9 @@
+ __  __
+ \ \/ /___ __  __ ___  ___  ___    Useful Commands:
+  \  // _ \\ \/ /,-_ |/ _ |/ -_)     remountrw - mount disk as read-write
+   \/ \___/ \  / \___,\_  |\___|     remountro - mount disk as read-only
+           _/_/        _'_|          remove.docs - remove all docs and manpages 
+     { V o y a g e } - L i n u x     
+      < http://linux.voyage.hk >   Version: 0.6
+
+
--- voyage-util-0.6.orig/overlay_fs/etc/bash_completion.d/trafmon
+++ voyage-util-0.6/overlay_fs/etc/bash_completion.d/trafmon
@@ -0,0 +1,33 @@
+_trafmon() 
+{
+    local cur prev opts
+    COMPREPLY=()
+    cur="${COMP_WORDS[COMP_CWORD]}"
+    prev="${COMP_WORDS[COMP_CWORD-1]}"
+    opts=`ip link show | awk '{if((NR%2) == 1) {interface = $2} else {if( $1 ~ /link\/ether/ ) {{sub(/:/, "", interface)} print interface}}}'`
+    secarray=([0]=src-addr [1]=src-port [2]=dst-addr [3]=dst-port [4]=proto )
+    usearray=([0]=src-addr [1]=src-port [2]=dst-addr [3]=dst-port [4]=proto )
+    if [[ ${COMP_CWORD} -gt 2 ]]; then
+        for i in 0 1 2 3 4
+        do
+            LIMIT=COMP_CWORD
+            for ((j=2; j < LIMIT ; j++)) 
+                do
+                    if [[ ${secarray[$i]} == ${COMP_WORDS[$j]} ]]; then
+                        usearray[$i]=""
+                    fi
+                done
+        done
+        COMPREPLY=( $(compgen -W "${usearray[*]}" -- ${cur}) )
+        return 0
+    fi
+    if [[ ${COMP_CWORD} -gt 1 ]]; then
+        COMPREPLY=( $(compgen -W "${secarray[*]}" -- ${cur}) )
+        return 0
+    fi
+    if [[ ${cur} == * ]] ; then
+        COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+        return 0
+    fi
+}
+complete -F _trafmon trafmon
--- voyage-util-0.6.orig/overlay_fs/etc/voyage-profiles/genericpc.pro
+++ voyage-util-0.6/overlay_fs/etc/voyage-profiles/genericpc.pro
@@ -0,0 +1,3 @@
+VOYAGE_PROFILE="Generic PC"
+VOYAGE_SYSTEM_CONSOLE=standard
+VOYAGE_SYSTEM_PCMCIA=no
--- voyage-util-0.6.orig/overlay_fs/etc/voyage-profiles/notebook.pro
+++ voyage-util-0.6/overlay_fs/etc/voyage-profiles/notebook.pro
@@ -0,0 +1,4 @@
+VOYAGE_PROFILE="Notebook (pcmcia)"
+VOYAGE_SYSTEM_CONSOLE=standard
+VOYAGE_SYSTEM_PCMCIA=yes
+VOYAGE_SYSTEM_MODULES=
--- voyage-util-0.6.orig/overlay_fs/etc/voyage-profiles/4501.pro
+++ voyage-util-0.6/overlay_fs/etc/voyage-profiles/4501.pro
@@ -0,0 +1,5 @@
+VOYAGE_PROFILE=4501
+VOYAGE_SYSTEM_CONSOLE=serial
+VOYAGE_SYSTEM_SERIAL=19200
+VOYAGE_SYSTEM_PCMCIA=no
+VOYAGE_SYSTEM_MODULES=""
--- voyage-util-0.6.orig/overlay_fs/etc/voyage-profiles/wrap.pro
+++ voyage-util-0.6/overlay_fs/etc/voyage-profiles/wrap.pro
@@ -0,0 +1,6 @@
+
+VOYAGE_PROFILE=WRAP
+VOYAGE_SYSTEM_CONSOLE=serial
+VOYAGE_SYSTEM_SERIAL=38400
+VOYAGE_SYSTEM_PCMCIA=no
+VOYAGE_SYSTEM_MODULES="wd1100 sysctl_wd_graceful=0 sysctl_wd_timeout=30; lm77; scx200_acb base=0x810,0x820; led-class; leds-wrap; ledtrig-heartbeat; ledtrig-timer ; ledtrig-netdev"
--- voyage-util-0.6.orig/overlay_fs/etc/voyage-profiles/4511.pro
+++ voyage-util-0.6/overlay_fs/etc/voyage-profiles/4511.pro
@@ -0,0 +1,5 @@
+VOYAGE_PROFILE=4511/4521
+VOYAGE_SYSTEM_CONSOLE=serial
+VOYAGE_SYSTEM_SERIAL=19200
+VOYAGE_SYSTEM_PCMCIA=yes
+VOYAGE_SYSTEM_MODULES=""
--- voyage-util-0.6.orig/overlay_fs/etc/voyage-profiles/alix.pro
+++ voyage-util-0.6/overlay_fs/etc/voyage-profiles/alix.pro
@@ -0,0 +1,6 @@
+
+VOYAGE_PROFILE=ALIX
+VOYAGE_SYSTEM_CONSOLE=serial
+VOYAGE_SYSTEM_SERIAL=38400
+VOYAGE_SYSTEM_PCMCIA=no
+VOYAGE_SYSTEM_MODULES="lm90; w83627hf; scx200_acb base=0x810,0x820; geodewdt; led-class; leds-alix; ledtrig-heartbeat; ledtrig-timer; ledtrig-netdev"
--- voyage-util-0.6.orig/overlay_fs/etc/voyage-profiles/5501.pro
+++ voyage-util-0.6/overlay_fs/etc/voyage-profiles/5501.pro
@@ -0,0 +1,6 @@
+
+VOYAGE_PROFILE=5501
+VOYAGE_SYSTEM_CONSOLE=serial
+VOYAGE_SYSTEM_SERIAL=19200
+VOYAGE_SYSTEM_PCMCIA=no
+VOYAGE_SYSTEM_MODULES="pc87360; pc87360_gpio; scx200_acb base=0x810,0x820"
--- voyage-util-0.6.orig/overlay_fs/etc/voyage-profiles/4801.pro
+++ voyage-util-0.6/overlay_fs/etc/voyage-profiles/4801.pro
@@ -0,0 +1,5 @@
+VOYAGE_PROFILE=4801
+VOYAGE_SYSTEM_CONSOLE=serial
+VOYAGE_SYSTEM_SERIAL=19200
+VOYAGE_SYSTEM_PCMCIA=no
+VOYAGE_SYSTEM_MODULES="wd1100 sysctl_wd_graceful=0 sysctl_wd_timeout=30; lm77; scx200_acb base=0x810,0x820"
--- voyage-util-0.6.orig/update-config.sh
+++ voyage-util-0.6/update-config.sh
@@ -45,8 +45,8 @@
     cmd1="/^[0-9]:/ s/^/#/"
     cmd2="s/^#T0:/T0:/;s/ttyS0 .*00/ttyS0 ${VOYAGE_SYSTEM_SERIAL}/"
   else
-    cmd1="/^[0-9]:/ s/^/#/"
-    cmd2="s/&T0:/#T0:/"
+    cmd1="/^#[0-9]:/ s/^#//"
+    cmd2="s/^T0:/#T0:/"
   fi
   cat $1/etc/inittab | sed -e "$cmd1" | sed -e "$cmd2" > \
     $2/etc/inittab
@@ -66,3 +66,14 @@
   fi
 }
 
+#
+#	Function remove_dnsmasq_pxe()
+#	Remove line containing dnsmasq.pxe.conf in /etc/dnsmasq.more.conf
+#	Params:	$1 - root directory of target
+#
+remove_dnsmasq_pxe() {
+  if [ -n $1 ] && [ -f $1/etc/dnsmasq.more.conf ] ; then
+  	sed -i "$1/etc/dnsmasq.more.conf" -e "/dnsmasq.pxe.conf/ D"   >&2
+    echo "Removing dnsmasq.pxe.conf in /etc/dnsmasq.more.conf" >&2    
+  fi
+}
--- voyage-util-0.6.orig/Makefile
+++ voyage-util-0.6/Makefile
@@ -0,0 +1,28 @@
+# Makefile
+
+install:
+	# Installing main scripts
+	install -m 755 ./*.sh ${DESTDIR}/usr/local/sbin
+
+	install -m 755 voyage.update ${DESTDIR}/usr/local/sbin
+
+#	install -d -m 755 $(DESTDIR)/etc/voyage-profiles
+#	install -m 644 voyage-profiles/* $(DESTDIR)/etc/voyage-profiles
+
+	cp -r overlay_fs/* $(DESTDIR)/ 
+
+	find $(DESTDIR) -name ".svn" -exec rm -rf '{}' '+'
+	find $(DESTDIR) -name "*.bak" -exec rm -rf '{}' '+'
+	
+#####################################
+# unused
+	# Installing sub scripts
+	#install -d -m 755 $(DESTDIR)/usr/share/make-live/scripts
+	#install -m 755 scripts/* $(DESTDIR)/usr/share/make-live/scripts
+
+	# Installing manpage
+	#install -D -m 644 make-live.8 $(DESTDIR)/usr/share/man/man8/make-live.8
+
+	# Installing configuration file
+	#install -D -m 644 make-live.default $(DESTDIR)/etc/default/make-live
+
--- voyage-util-0.6.orig/autoinstall.sh
+++ voyage-util-0.6/autoinstall.sh
@@ -0,0 +1,95 @@
+#!/bin/bash
+########################################################################
+
+# by default export all variables
+set -a
+
+# remember the current dir for future use and get the path to
+# the directory where this script is located
+RUNDIR=$PWD
+cd `dirname $0`
+EXECDIR=$PWD
+cd $RUNDIR
+
+# load the script containing our utility routines
+source $EXECDIR/script-utils.sh
+# select-profile is a separate script but usually needed
+source $EXECDIR/select-profile.sh
+
+DISTDIR=/tmp/root
+TARGET_DISK="/dev/hda"
+TARGET_PART=1 
+TARGET_MOUNT="/tmp/cf" 
+BOOTSTRAP_PART=1
+BOOTSTRAP="grub" 
+SYSTEM_BOOTSTRAP=$BOOTSTRAP
+
+INSTALL_PROFILE=alix
+if [ ! -z $1 ] ; then INSTALL_PROFILE=$1 ; fi
+
+PROFILE_FILE=/etc/voyage-profiles/$INSTALL_PROFILE.pro
+if [ ! -f $PROFILE_FILE ] ; then 
+	echo "Install profile $PROFILE_FILE not found !"
+	exit 1
+fi
+source $PROFILE_FILE
+
+echo "########################################################################"
+echo "  WARNING: Voyage Linux Auto-Install will start in 5 seconds.  It will "
+echo "           erase your disk in $TARGET_DISK.  If you want to stop, please"
+echo "           press Ctrl+C now !!"
+echo "########################################################################"
+sleep 5
+if [ $? != 0 ] ; then exit 1; fi
+
+########################################################################
+
+if [ ! -d $DISTDIR ] ; then mkdir $DISTDIR ; fi
+if [ ! -d $TARGET_MOUNT ] ; then mkdir $TARGET_MOUNT ; fi
+umount $DISTDIR > /dev/null
+umount $TARGET_MOUNT > /dev/null
+
+SQFS=$(find / -name "filesystem.squashfs" | head -n1)
+if [ ! -z $SQFS ] ; then
+	mount -o loop $SQFS $DISTDIR
+else
+	echo "filesystem.squashfs not found! Abort. "
+	exit 1
+fi
+
+cd $DISTDIR
+
+########################################################################
+
+$EXECDIR/format-cf.sh  $TARGET_DISK   << EOF
+
+EOF
+
+########################################################################
+
+show_details
+
+########################################################################
+
+save_config_var VOYAGE_PROFILE VOYAGE_CONF_LIST
+save_config_var SYSTEM_BOOTSTRAP VOYAGE_CONF_LIST
+save_config_var VOYAGE_SYSTEM_SERIAL VOYAGE_CONF_LIST
+save_config_var VOYAGE_SYSTEM_CONSOLE VOYAGE_CONF_LIST
+
+########################################################################
+
+$EXECDIR/copyfiles.sh
+
+########################################################################
+
+cd $RUNDIR
+umount $DISTDIR
+
+echo "########################################################################"
+echo "  Voyage Linux Auto-Install completes. The system will reboot in 5 secs."
+echo "  If you want to stop, please press Ctrl+C now !!"
+echo "########################################################################"
+sleep 5
+if [ $? != 0 ] ; then exit 1; fi
+reboot
+
