--- xen-shell-1.8.orig/Makefile
+++ xen-shell-1.8/Makefile
@@ -50,7 +50,7 @@
 
 
 makemanpages: clean
-	cd bin; for i in *-*; do pod2man --release=${VERSION} --official --section=8 $$i ../man/$$i.man; done
+	cd bin; for i in *-*; do pod2man --release=${VERSION} --official --section=1 $$i ../man/$$i.man; done
 
 
 
--- xen-shell-1.8.orig/bin/xm-reimage
+++ xen-shell-1.8/bin/xm-reimage
@@ -77,11 +77,11 @@
 EOF
 
 echo -n " "
-for i in `seq 1 10`; do 
+for i in `seq 1 10`; do
     echo -n "${i} "
     sleep 1
 done
-echo -e "\nCommitted."
+/bin/echo -e "\nCommitted."
 
 
 #
--- xen-shell-1.8.orig/man/xm-reimage.man
+++ xen-shell-1.8/man/xm-reimage.man
@@ -128,5 +128,5 @@
 .rm #[ #] #H #V #F C
 .\" ========================================================================
 .\"
-.IX Title "XM-REIMAGE 8"
-.TH XM-REIMAGE 8 "2007-03-01" "1.3" "Perl Programmers Reference Guide"
+.IX Title "XM-REIMAGE 1"
+.TH XM-REIMAGE 1 "2007-11-17" "1.8" "Perl Programmers Reference Guide"
--- xen-shell-1.8.orig/man/xen-login-shell.man
+++ xen-shell-1.8/man/xen-login-shell.man
@@ -128,5 +128,5 @@
 .rm #[ #] #H #V #F C
 .\" ========================================================================
 .\"
-.IX Title "XEN-LOGIN-SHELL 8"
-.TH XEN-LOGIN-SHELL 8 "2007-03-01" "1.3" "Perl Programmers Reference Guide"
+.IX Title "XEN-LOGIN-SHELL 1"
+.TH XEN-LOGIN-SHELL 1 "2007-11-17" "1.8" "Perl Programmers Reference Guide"
--- xen-shell-1.8.orig/man/xen-shell.man
+++ xen-shell-1.8/man/xen-shell.man
@@ -128,8 +128,8 @@
 .rm #[ #] #H #V #F C
 .\" ========================================================================
 .\"
-.IX Title "XEN-SHELL 8"
-.TH XEN-SHELL 8 "2007-08-07" "1.3" "Perl Programmers Reference Guide"
+.IX Title "XEN-SHELL 1"
+.TH XEN-SHELL 1 "2007-11-17" "1.8" "Perl Programmers Reference Guide"
 .SH "NAME"
 xen\-shell \- Provide a console interface to control Xen guests.
 .SH "SYNOPSIS"
@@ -187,7 +187,7 @@
 .Ve
 .PP
 .Vb 1
-\&  xen_shell = 'bob, steve, chris'
+\&  xen_shell = \(aqbob, steve, chris\(aq
 .Ve
 .PP
 .Vb 3
@@ -247,7 +247,7 @@
 .Ve
 .PP
 .Vb 1
-\&  xen_shell_blacklist = 'version, uptime'
+\&  xen_shell_blacklist = \(aqversion, uptime\(aq
 .Ve
 .SH "REIMAGING SUPPORT"
 .IX Header "REIMAGING SUPPORT"
@@ -275,19 +275,48 @@
 .Ve
 .PP
 .Vb 2
-\&   xen\-create\-image \-\-hostname=skx.xen\-hosting.net \-\-ip=1.2.3.4 \e
-\&      \-\-size=9.5Gb \-\-swap=512Mb \-\-memory=256Mb \-\-force
+\&   # the instance to be reimaged will be passed upon the command line.
+\&   host=$1
 .Ve
 .PP
 .Vb 2
-\&  If ~$USER/image.sh doesn't exist, or isn't executable, this command
+\&   # The username we are.
+\&   user=$2
+.Ve
+.PP
+.Vb 2
+\&   # find the IP by grepping /etc/hosts.
+\&   ip=$(grep "$host" /etc/hosts|awk \(aq{print $1}\(aq)
+.Ve
+.PP
+.Vb 1
+\&   if [ ! \-z "${ip}" ]; then
+.Ve
+.PP
+.Vb 4
+\&      xen\-create\-image \-\-hostname=$host \-\-ip=$ip \e
+\&      \-\-size=9.5Gb \-\-swap=512Mb \-\-memory=256Mb \-\-force \e
+\&      \-\-dist=etch \-\-admin=$user
+\&   else
+.Ve
+.PP
+.Vb 1
+\&      echo "IP address not found for guest $host \- aborting"
+.Ve
+.PP
+.Vb 1
+\&   fi
+.Ve
+.PP
+.Vb 2
+\&  If ~$USER/image.sh doesn\(aqt exist, or isn\(aqt executable, this command
 \& will be disabled.
 .Ve
-.Sh "\s-1REVERSE\s0 \s-1DNS\s0 \s-1SUPPORT\s0"
-.IX Subsection "REVERSE DNS SUPPORT"
+.SH "REVERSE DNS SUPPORT"
+.IX Header "REVERSE DNS SUPPORT"
 .Vb 4
 \&  This shell contains a built\-in system for allowing a Xen\-shell user to
-\& manipulate reverse DNS entries for IP addresses.  The shell itself doesn't
+\& manipulate reverse DNS entries for IP addresses.  The shell itself doesn\(aqt
 \& do this directly, instead the shell will manipulate a simple text file
 \& in a users home directory.
 .Ve
@@ -319,15 +348,15 @@
 .Ve
 .PP
 .Vb 2
-\&  If the file doesn't exist, or isn't writable, then the command will
+\&  If the file doesn\(aqt exist, or isn\(aqt writable, then the command will
 \& be disabled.
 .Ve
-.Sh "\s-1BANDWIDTH\s0 \s-1TRACKING\s0"
-.IX Subsection "BANDWIDTH TRACKING"
+.SH "BANDWIDTH TRACKING"
+.IX Header "BANDWIDTH TRACKING"
 .Vb 4
-\&  If you've got the 'vnstat' tool installed upon your host and the
+\&  If you\(aqve got the \(aqvnstat\(aq tool installed upon your host and the
 \& primary network interface of your Xen guest is given the same name
-\& as that of the guest you may see the bandwidth used via the 'bandwidth'
+\& as that of the guest you may see the bandwidth used via the \(aqbandwidth\(aq
 \& command.
 .Ve
 .PP
@@ -337,12 +366,12 @@
 .Ve
 .PP
 .Vb 1
-\&  vif = [ 'ip=192.168.1.100,vifname=skx' ]
+\&  vif = [ \(aqip=192.168.1.100,vifname=skx\(aq ]
 .Ve
 .PP
 .Vb 2
-\&  Now when you run "ifconfig \-a" upon the dom0 you'll see the guest
-\& has an interface named 'skx'.
+\&  Now when you run "ifconfig \-a" upon the dom0 you\(aqll see the guest
+\& has an interface named \(aqskx\(aq.
 .Ve
 .PP
 .Vb 2
@@ -358,7 +387,7 @@
 .Ve
 .PP
 .Vb 1
-\& $Id: xen-shell.man,v 1.2 2007-08-07 20:25:18 steve Exp $
+\& $Id: xen\-shell,v 1.110 2007\-11\-17 13:44:10 steve Exp $
 .Ve
 .SH "LICENSE"
 .IX Header "LICENSE"
@@ -377,7 +406,7 @@
 .Ve
 .PP
 .Vb 1
-\& $Id: xen-shell.man,v 1.2 2007-08-07 20:25:18 steve Exp $
+\& $Id: xen\-shell,v 1.110 2007\-11\-17 13:44:10 steve Exp $
 .Ve
 .SH "LICENSE"
 .IX Header "LICENSE"
--- xen-shell-1.8.orig/man/xen-add-user.man
+++ xen-shell-1.8/man/xen-add-user.man
@@ -128,5 +128,5 @@
 .rm #[ #] #H #V #F C
 .\" ========================================================================
 .\"
-.IX Title "XEN-ADD-USER 8"
-.TH XEN-ADD-USER 8 "2006-08-16" "1.3" "Perl Programmers Reference Guide"
+.IX Title "XEN-ADD-USER 1"
+.TH XEN-ADD-USER 1 "2007-11-17" "1.8" "Perl Programmers Reference Guide"
--- xen-shell-1.8.orig/debian/changelog
+++ xen-shell-1.8/debian/changelog
@@ -0,0 +1,119 @@
+xen-shell (1.8-3~bpo40+1) etch-backports; urgency=low
+
+  * rebuild for etch
+
+ -- Jan Wagner <waja@cyconet.org>  Tue,  8 Apr 2008 00:04:13 +0200
+
+xen-shell (1.8-3) unstable; urgency=high
+
+  * Removed the last bashism in our code.
+    (Closes: #472891)
+
+ -- Steve Kemp <skx@debian.org>  Tue, 1 Apr 2008 15:44:51 +0000
+
+xen-shell (1.8-2) unstable; urgency=low
+
+  * Removed bashisms in our scripts.
+    - Two false reports remain.
+  * Bumpted standards versions to 3.7.3
+    - Moved Homepage: field from description into control section.
+    - Tidied manpage section(s).
+
+ -- Steve Kemp <skx@debian.org>  Sun, 3 Feb 2008 01:44:10 +0000
+
+xen-shell (1.8-1) unstable; urgency=low
+
+  * New upstream release:
+    - Add a 'whoami' command.  (Closes: #447516)
+    - Correctly pass username and hostname onto reimage script.
+
+ -- Steve Kemp <skx@debian.org>  Sat, 17 Nov 2007 13:42:42 +0000
+
+xen-shell (1.7-1) unstable; urgency=low
+
+  * New upstream release:
+    - Restores --control to working order.
+    - Show uptime of guests even on "recent" Xen systems.
+    - Avoid terminating before showing even more error messages.
+    - Allow admin to specify a different filename for history storing.
+    - Cause history to be saved even in an unclean shutdown.
+    - Added correct version ;)
+
+ -- Steve Kemp <skx@debian.org>  Tue, 25 Sep 2007 19:54:31 +0000
+
+xen-shell (1.6-1) unstable; urgency=low
+
+  * New upstream release:
+    - Fixes a bug in handling bandwidth tracking for people with
+      control of more than one domU.
+      (Closes: #440079)
+
+ -- Steve Kemp <skx@debian.org>  Tue, 11 Sep 2007 23:17:21 +0000
+
+xen-shell (1.5-1) unstable; urgency=low
+
+  * New upstream release:
+    - Adds the new command 'sysreq' for sending sysreq characters.
+    - Adds an optional 'force' parameter to the shutdown command.
+
+ -- Steve Kemp <skx@debian.org>  Fri, 17 Aug 2007 13:35:05 +0000
+
+xen-shell (1.3-1) unstable; urgency=low
+
+  * New upstream release:
+    - Allows traffic reporting via 'vnstat'
+
+ -- Steve Kemp <steve@steve.org.uk>  Fri, 3 Aug 2007 23:58:40 +0000
+
+xen-shell (1.2-1) stable; urgency=low
+
+  * New upstream release:
+    - Two new commands were added: "pause" & "unpause".
+
+ -- Steve Kemp <steve@steve.org.uk>  Fri, 11 May 2007 17:26:19 +0000
+
+xen-shell (0.9-1) stable; urgency=low
+
+  * New upstream release:
+    - The list of instances a user may control now shows only unique names.
+    - Many minor spelling and documentation updates.
+    - Added reference to the two mailing lists we use.
+
+ -- Steve Kemp <steve@steve.org.uk>  Sat, 24 Feb 2007 01:32:28 +0000
+
+xen-shell (0.8-1) stable; urgency=low
+
+  * New upstream release:
+    - The user may control multiple Xen guests.
+    - Added "list" + "control" commands.
+
+ -- Steve Kemp <steve@steve.org.uk>  Mon, 01 Jan 2007 17:02:21 +0000
+
+xen-shell (0.7-1) stable; urgency=low
+
+  * New upstream release:
+    - Added "top" command.
+
+ -- Steve Kemp <steve@steve.org.uk>  Mon, 25 Dec 2006 23:45:02 +0000
+
+xen-shell (0.6-1) stable; urgency=low
+
+  * New upstream release:
+    - improves detection of the correct guest.
+    - changes versioning system.
+    - works with non-GNU readline module.
+
+ -- Steve Kemp <steve@steve.org.uk>  Thu, 7 Dec 2006 16:29:02 +0000
+
+xen-shell (0.5-1) stable; urgency=low
+
+  * New upstream release, adds the "passwd" command.
+
+ -- Steve Kemp <steve@steve.org.uk>  Fri, 29 Sep 2006 17:19:04 +0000
+
+xen-shell (0.4-0) stable; urgency=low
+
+  * Initial release
+
+ -- Steve Kemp <steve@steve.org.uk>  Wed, 16 Aug 2006 17:50:46 +0000
+
--- xen-shell-1.8.orig/debian/dirs
+++ xen-shell-1.8/debian/dirs
@@ -0,0 +1,3 @@
+/etc/xen-shell
+/usr/bin
+/usr/share/man/man1
\ No newline at end of file
--- xen-shell-1.8.orig/debian/control
+++ xen-shell-1.8/debian/control
@@ -0,0 +1,19 @@
+Source: xen-shell
+Section: utils
+Priority: extra
+Maintainer: Radu Spineanu <radu@debian.org>
+Uploaders: Steve Kemp <skx@debian.org>, Jan Wagner <waja@cyconet.org>
+Build-Depends: debhelper (>= 4.0.0)
+Standards-Version: 3.7.3
+Homepage: http://xen-tools.org/software/xen-shell
+
+Package: xen-shell
+Architecture: all
+Depends: perl-modules, libterm-readline-gnu-perl, screen, sudo
+Recommends: xen-tools, vnstat
+Description: Console based Xen administration utility
+ Using the xen-shell a hosting company could easily allow their customers
+ to fully manage individual Xen guest instances.
+ .
+ The shell allows users to start, stop, reboot, or connect to the serial
+ console of a Xen guest instance upon a Xen system.
--- xen-shell-1.8.orig/debian/compat
+++ xen-shell-1.8/debian/compat
@@ -0,0 +1 @@
+4
--- xen-shell-1.8.orig/debian/copyright
+++ xen-shell-1.8/debian/copyright
@@ -0,0 +1,23 @@
+This package was debianized by Steve Kemp <steve@steve.org.uk> on
+Wed Aug 16 17:53:06 BST 2006
+
+It was downloaded from http://xen-tools.org/software/xen-shell/
+
+Copyright 2006-2007 Steve Kemp <steve@steve.org.uk>
+
+License:
+
+This program is free software, you can redistribute it and/or modify it under
+the same terms as Perl itself.
+
+Perl is distributed under licenses:
+
+    a) the GNU General Public License as published by the Free Software
+       Foundation; either version 1, or version 2.
+
+    b) the "Artistic License" which comes with Perl.
+
+    On Debian GNU/Linux systems, the complete text of the GNU General
+    Public License can be found in /usr/share/common-licenses/GPL' and
+    the Artistic Licence in /usr/share/common-licenses/Artistic'.
+
--- xen-shell-1.8.orig/debian/rules
+++ xen-shell-1.8/debian/rules
@@ -0,0 +1,66 @@
+#!/usr/bin/make -f
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+	dh_testdir
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	make clean
+	rm -f build-stamp configure-stamp
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+
+	mkdir -p `pwd`/debian/xen-shell/etc/xen-shell
+	mkdir -p `pwd`/debian/xen-shell/usr/bin
+	mkdir -p `pwd`/debian/xen-shell/usr/share/man/man1
+
+	cp misc/_screenrc      `pwd`/debian/xen-shell/etc/xen-shell
+	cp misc/xen-shell.conf `pwd`/debian/xen-shell/etc/xen-shell
+	cp bin/xen-login-shell `pwd`/debian/xen-shell/usr/bin
+	cp bin/xen-shell       `pwd`/debian/xen-shell/usr/bin
+	cp bin/xm-reimage      `pwd`/debian/xen-shell/usr/bin
+
+# make the manpages
+	mkdir -p `pwd`/debian/xen-shell/usr/share/man/man1/
+	for i in man/*.man; do file=`basename $$i .man` ; cp $$i `pwd`/debian/xen-shell/usr/share/man/man1/$$file.1; done
+	for i in `pwd`/debian/xen-shell/usr/share/man/man1/*.1; do gzip -f -9 $$i; done
+
+# the xen-add-user isn't supposed to be installed so we delete that one.
+	rm `pwd`/debian/xen-shell/usr/share/man/man1/xen-add-user.1.gz
+
+	dh_installdirs
+	dh_installexamples bin/xen-add-user
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_install
+	dh_installchangelogs
+	dh_installdocs
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- xen-shell-1.8.orig/debian/.cvsignore
+++ xen-shell-1.8/debian/.cvsignore
@@ -0,0 +1,2 @@
+files
+xen-shell
--- xen-shell-1.8.orig/debian/docs
+++ xen-shell-1.8/debian/docs
@@ -0,0 +1,2 @@
+BUGS
+README
