summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/includes/distribution.inc6
-rwxr-xr-xmltk9
2 files changed, 14 insertions, 1 deletions
diff --git a/core/includes/distribution.inc b/core/includes/distribution.inc
index 57bafdf2..e64ace1f 100644
--- a/core/includes/distribution.inc
+++ b/core/includes/distribution.inc
@@ -26,7 +26,11 @@ detect_distribution () {
;;
esac
# Get version - we mangle this quite a bit. first make sure it has no spaces, then split version at period (.), underscore (_) and dash (-)
- SYS_VERSION=$(lsb_release -rs | tolower)
+ if [ -n "$FORCE_SYS_VERSION" ]; then
+ SYS_VERSION="$FORCE_SYS_VERSION"
+ else
+ SYS_VERSION=$(lsb_release -rs | tolower)
+ fi
SYS_CODENAME=$(lsb_release -c|cut -f 2) # Codename: eg. Ubuntu raring, openSuse: Dartmouth etc.
local VERSION=$(echo $SYS_VERSION | sed -r 's/\s//g;s/[\._]/ /g;s/-//g')
local STRTMP=""
diff --git a/mltk b/mltk
index b31ac518..43cf525a 100755
--- a/mltk
+++ b/mltk
@@ -202,6 +202,15 @@ read_params() {
REMOTE_EXPORT="1"
continue
;;
+ --force-sys-version)
+ if [ -z "$1" ]; then
+ perror "--force-sys-version requires an argument, e.g. '18.04'."
+ else
+ FORCE_SYS_VERSION="$1"
+ shift
+ fi
+ continue
+ ;;
*)
pwarning "Unknown flag to target: $PARAM"
print_usage