From d5595eaaa4dc5d692ead5d2889513d325142e4db Mon Sep 17 00:00:00 2001 From: David Nusinow Date: Tue, 22 Aug 2006 03:04:13 +0000 Subject: [PATCH] Pull patches from ubuntu for ARCHITECTURE, LAPTOP, RECONFIGURE, FIRSTINST, and UPGRADE variables --- xsfbs.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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;\