summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Nusinow <dnusinow@debian.org>2006-08-22 03:04:13 +0000
committerDavid Nusinow <dnusinow@debian.org>2006-08-22 03:04:13 +0000
commitd5595eaaa4dc5d692ead5d2889513d325142e4db (patch)
treecfc442f0ee7eabe11a786198de755e9875847ee9
parent34afaedccc1aeb05d2c6a3869f51e78b2dd0d210 (diff)
downloadxutils-dev-d5595eaaa4dc5d692ead5d2889513d325142e4db.tar.gz
Pull patches from ubuntu for ARCHITECTURE, LAPTOP, RECONFIGURE, FIRSTINST, and UPGRADE variables
-rw-r--r--xsfbs.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/xsfbs.sh b/xsfbs.sh
index 382b6ec..52473ca 100644
--- a/xsfbs.sh
+++ b/xsfbs.sh
@@ -57,6 +57,29 @@ EOF
exit $SHELL_LIB_USAGE_ERROR
fi
+ARCHITECTURE="$(dpkg --print-installation-architecture)"
+
+LAPTOP=""
+if [ -n "$(which laptop-detect)" ]; then
+ if laptop-detect >/dev/null; then
+ LAPTOP=true
+ fi
+fi
+
+if [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
+ RECONFIGURE="true"
+else
+ RECONFIGURE=
+fi
+
+if ([ "$1" = "install" ] || [ "$1" = "configure" ]) && [ -z "$2" ]; then
+ FIRSTINST="yes"
+fi
+
+if [ -z "$RECONFIGURE" ] && [ -z "$FIRSTINST" ]; then
+ UPGRADE="yes"
+fi
+
trap "message;\
message \"Received signal. Aborting $THIS_PACKAGE package $THIS_SCRIPT script.\";\
message;\