summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfunctions/defaults.sh23
1 files changed, 22 insertions, 1 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 97fc6016e..d4c16d490 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -26,7 +26,28 @@ Set_defaults ()
LB_SYSTEM="${LB_SYSTEM:-live}"
# Setting mode (currently: debian, emdebian, progress, ubuntu and kubuntu)
- LB_MODE="${LB_MODE:-debian}"
+ if [ -x /usr/bin/lsb_release ]
+ then
+ _DISTRIBUTOR="$(lsb_release -is | tr [A-Z] [a-z])"
+
+ case "${_DISTRIBUTOR}" in
+ debian|progress|ubuntu)
+ LB_MODE="${LB_MODE:-${_DISTRIBUTOR}}"
+ ;;
+
+ *)
+ LB_MODE="${LB_MODE:-debian}"
+ ;;
+ esac
+ else
+ if [ -e /etc/progress_version ]
+ then
+ LB_MODE="${LB_MODE:-progress}"
+ elif [ -e /etc/ubuntu_version ]
+ then
+ LB_MODE="${LB_MODE:-ubuntu}"
+ fi
+ fi
# Setting distribution name
case "${LB_MODE}" in