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"
This commit is contained in:
parent
4453803c0c
commit
a34f572964
@ -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
|
||||
|
||||
###############################
|
||||
|
Loading…
Reference in New Issue
Block a user