Serghey Rodin 12 лет назад
Родитель
Сommit
82f3f72679
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      bin/v-change-user-package

+ 3 - 2
bin/v-change-user-package

@@ -136,8 +136,9 @@ fi
 change_user_package
 
 # Update user shell
-shell_path=$(/usr/bin/chsh --list-shells | grep -w "$SHELL" |head -n1)
-/usr/bin/chsh -s "$shell_path" "$user" &>/dev/null
+shell_conf=$(echo "$pkg_data" | grep 'SHELL' | cut -f 2 -d \')
+shell=$(grep -w "$shell_conf" /etc/shells |head -n1)
+/usr/bin/chsh -s "$shell" "$user" &>/dev/null
 
 # Run template trigger
 if [ -x "$VESTA/data/packages/$package.sh" ]; then