Skip to content

Commit 82f3f72

Browse files
committed
fix for ubuntu and debian
1 parent fb4ddfc commit 82f3f72

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/v-change-user-package

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,9 @@ fi
136136
change_user_package
137137

138138
# Update user shell
139-
shell_path=$(/usr/bin/chsh --list-shells | grep -w "$SHELL" |head -n1)
140-
/usr/bin/chsh -s "$shell_path" "$user" &>/dev/null
139+
shell_conf=$(echo "$pkg_data" | grep 'SHELL' | cut -f 2 -d \')
140+
shell=$(grep -w "$shell_conf" /etc/shells |head -n1)
141+
/usr/bin/chsh -s "$shell" "$user" &>/dev/null
141142

142143
# Run template trigger
143144
if [ -x "$VESTA/data/packages/$package.sh" ]; then

0 commit comments

Comments
 (0)