summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-12-18 11:40:30 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-12-18 11:40:30 -0500
commita34f572964153921ebd4c721a65228e3384662b5 (patch)
tree28a73786fb81f7c1e3678485a6b87940387a3292 /tools
parent4453803c0c4bce4e4bfe5549f8e93453fa864506 (diff)
specify shell to use during install, to avoid problems with non-standard shells.
based on github pull request #68 from nulltrek, who noted: "If the system shell is not syntax compliant with sh (such as fish shell), the install script fails to execute some lines (like stage2.run:671, fish shell doesn't have the && operator) because the "su" command opens a new default shell"
Diffstat (limited to 'tools')
-rwxr-xr-xtools/linux_packaging/stage2.run12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/linux_packaging/stage2.run b/tools/linux_packaging/stage2.run
index 06c16c0051..effc97b636 100755
--- a/tools/linux_packaging/stage2.run
+++ b/tools/linux_packaging/stage2.run
@@ -14,6 +14,8 @@ PGM_NAME="Ardour"
PGM_VENDOR="Ardour"
PGM_EXEC_FILE="ardour3"
+THE_SHELL="/bin/sh"
+
if test -z "$INSTALL_DEST_BASE"; then
INSTALL_DEST_BASE="/opt"
CALL_MKDIR=1
@@ -135,7 +137,7 @@ if [ "$(id -u)" != "0" ]; then
echo "Please enter root password below"
echo ""
- if ! su -c "./.stage2.run";
+ if ! su -s $THE_SHELL -c "./.stage2.run";
then
echo ""
echo "!!! ERROR !!!"
@@ -144,7 +146,7 @@ if [ "$(id -u)" != "0" ]; then
echo "running as root AND an attempt to use su failed."
echo ""
echo "Please correct this by installing and configuring sudo or running"
- echo "the installer as root (su -c)."
+ echo "the installer as root (su -s $THE_SHELL -c)."
echo ""
read -p "Press ENTER to exit installer:" BLAH
exit 1
@@ -161,7 +163,7 @@ if [ "$(id -u)" != "0" ]; then
echo "Please enter root password below"
echo ""
- if ! su -c "./.stage2.run";
+ if ! su -s $THE_SHELL -c "./.stage2.run";
then
echo ""
echo "!!! ERROR !!!"
@@ -170,7 +172,7 @@ if [ "$(id -u)" != "0" ]; then
echo "running as root AND an attempt to use both sudo and su failed."
echo ""
echo "Please correct this by installing and configuring sudo or running"
- echo "the installer as root (su -c)."
+ echo "the installer as root (su -s $THE_SHELL -c)."
echo ""
read -p "Press ENTER to exit installer:" BLAH
exit 1
@@ -183,7 +185,7 @@ if [ "$(id -u)" != "0" ]; then
# su. Using sh -c in the normal case gets around that, but is a bit of a hack.
NORM_USER="sh -c"
else
- NORM_USER="su -l $USER_NAME -c"
+ NORM_USER="su -l $USER_NAME -s $THE_SHELL -c"
fi
###############################