mirror of
https://github.com/Le0xFF/VoidLinuxInstaller.git
synced 2024-08-17 14:40:22 +03:00
Check if shell is executable in chroot.sh script
This commit is contained in:
parent
0cd4f2da3c
commit
78ee440da9
4
vli.sh
4
vli.sh
@ -387,7 +387,7 @@ function finish_chroot {
|
||||
chsh --list-shells
|
||||
echo -e -n "\nWhich \${BLUE_LIGHT}shell\${NORMAL} do you want to set for \${BLUE_LIGHT}root\${NORMAL} user?\nPlease enter the full path (i.e. /bin/sh): "
|
||||
read -r set_shell
|
||||
if ! chsh --shell "\$set_shell" &> /dev/null ; then
|
||||
if [[ ! -x "\$set_shell" ]] ; then
|
||||
echo -e -n "\nPlease enter a valid shell.\n\n"
|
||||
read -n 1 -r -p "[Press any key to continue...]" key
|
||||
clear
|
||||
@ -396,8 +396,8 @@ function finish_chroot {
|
||||
echo -e -n "\nYou entered: \${BLUE_LIGHT}\$set_shell\${NORMAL}.\n\n"
|
||||
read -n 1 -r -p "Is this the desired shell? (y/n): " yn
|
||||
if [[ "\$yn" == "y" ]] || [[ "\$yn" == "Y" ]] ; then
|
||||
echo -e -n "\n\nDefault shell successfully changed.\n\n"
|
||||
chsh --shell "\$set_shell"
|
||||
echo -e -n "\n\nDefault shell successfully changed.\n\n"
|
||||
read -n 1 -r -p "[Press any key to continue...]" key
|
||||
clear
|
||||
break 2
|
||||
|
Loading…
Reference in New Issue
Block a user