From 152529de70688a88570d259c1b9207039b5d17ea Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Tue, 20 Apr 2004 18:15:19 +0000 Subject: [PATCH] added patch from Matthew Lavy for Debian support git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/branches/SYSCALL_SWITCH@1484 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/scripts/distrib-info | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/util-vserver/scripts/distrib-info b/util-vserver/scripts/distrib-info index 5a35f5e..241127e 100755 --- a/util-vserver/scripts/distrib-info +++ b/util-vserver/scripts/distrib-info @@ -2,7 +2,8 @@ # Copyright (C) 2003 Enrico Scholz # based on distrib-info by Jacques Gelinas -# +# Debian support shoe-horned in by Matthew Lavy +# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) @@ -71,6 +72,27 @@ if [ -f $DIRDIR/etc/redhat-release -o -f $DISTDIR/etc/mandrake-release ] ; then echo unknown request $KEY >&2 ;; esac +elif [ -f $DISTDIR/etc/debian_version ] ; then + case $KEY in + pkgversion) + $CHROOTCMD /usr/bin/dpkg-query -W \ + --showformat='${Package}=${Version}#${Status}\n' \ + | perl -pe 's/(.+)-.*/$1/' \ + | grep "install ok installed" | cut -d"#" -f1 + ;; + unifiles) + echo $* | perl -pe 's/(.+)-.*/$1/' \ + | xargs $CHROOTCMD /usr/bin/dpkg -L \ + | grep -v "^/etc\|^/var" + ;; + dumpfiles) + echo $* | perl -pe 's/(.+)-.*/$1/' \ + | xargs $CHROOTCMD /usr/bin/dpkg -L + ;; + *) + echo unknown request $KEY >&2 + ;; + esac else echo Distribution not supported yet >&2 fi -- 1.8.1.5