VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-02-10 15:05:20 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-02-11 09:02:41 +0100
commitb920bb2a6adebb5c8ee101fe5e369c50888035eb (patch)
treeab0bbd85167eb131f16a229de4a9bd6d18285d5e /src
parent5012e0941a7f9fd00342513b4857969fd867cc30 (diff)
downloadVeraCrypt-b920bb2a6adebb5c8ee101fe5e369c50888035eb.tar.gz
VeraCrypt-b920bb2a6adebb5c8ee101fe5e369c50888035eb.zip
Linux: modify installer script to make it run when the "less" command doesn't support the -X argument (Busybox case)
Diffstat (limited to 'src')
-rw-r--r--src/Main/Main.make2
-rw-r--r--src/Setup/Linux/veracrypt_install_template.sh26
2 files changed, 24 insertions, 4 deletions
diff --git a/src/Main/Main.make b/src/Main/Main.make
index 7d3a9cf5..9854bd42 100644
--- a/src/Main/Main.make
+++ b/src/Main/Main.make
@@ -197,7 +197,7 @@ endif
@echo "VERSION=$(TC_VERSION)" >> $(INTERNAL_INSTALLER_NAME)
@echo "PACKAGE_TYPE=tar" >> $(INTERNAL_INSTALLER_NAME)
@echo "PACKAGE_NAME=$(PACKAGE_NAME)" >> $(INTERNAL_INSTALLER_NAME)
- @echo "PACKAGE_START=896" >> $(INTERNAL_INSTALLER_NAME)
+ @echo "PACKAGE_START=916" >> $(INTERNAL_INSTALLER_NAME)
@echo "INSTALLER_TYPE=$(INSTALLER_TYPE)" >> $(INTERNAL_INSTALLER_NAME)
@cat $(PWD)/Setup/Linux/veracrypt_install_template.sh >> $(INTERNAL_INSTALLER_NAME)
diff --git a/src/Setup/Linux/veracrypt_install_template.sh b/src/Setup/Linux/veracrypt_install_template.sh
index 427f9320..22d080f6 100644
--- a/src/Setup/Linux/veracrypt_install_template.sh
+++ b/src/Setup/Linux/veracrypt_install_template.sh
@@ -774,16 +774,36 @@ printf 'terms of the VeraCrypt License.\n\nPress Enter to display the license te
read A
MORE=more
-which less >/dev/null 2>/dev/null && MORE='less -E -X'
-
+HASLESS=0
+which less >/dev/null 2>/dev/null && HASLESS=1
+if [ $HASLESS -eq 1 ]
+then
+ MORE='less -E -X'
+fi
cat <<_END | cat - $LICENSE | $MORE
Press Enter or space bar to see the rest of the license.
_END
+ if [ $? -ne 0 ]
+ then
+ if [ $HASLESS -eq 1 ]
+ then
+# use less without -X as it is not supported by some versions (busybox case)
+ MORE='less -E'
+ cat <<_END | cat - $LICENSE | $MORE
+
+Press Enter or space bar to see the rest of the license.
+
+
+_END
+ [ $? -ne 0 ] && exit 1
+ else
+ exit 1
+ fi
+ fi
- [ $? -ne 0 ] && exit 1
rm -f $LICENSE
ACCEPTED=0