mirror of
https://github.com/Fishwaldo/build.git
synced 2025-07-06 21:19:01 +00:00
Move changing to BASH to armbian-config (#2694)
This prevents unwanted automated switching back to bash on upgrade
This commit is contained in:
parent
a3d29f4082
commit
eb2060ab46
1 changed files with 0 additions and 12 deletions
|
@ -596,18 +596,6 @@ compile_armbian-zsh()
|
|||
exit 0
|
||||
END
|
||||
|
||||
# set up post remove script
|
||||
cat <<-END > "${tmp_dir}/${armbian_zsh_dir}"/DEBIAN/postrm
|
||||
#!/bin/sh
|
||||
# change shell back to bash for future users
|
||||
BASHLOCATION=\$(grep /bash\$ /etc/shells | tail -1)
|
||||
sed -i "s|^SHELL=.*|SHELL=\${BASHLOCATION}|" /etc/default/useradd
|
||||
sed -i "s|^DSHELL=.*|DSHELL=\${BASHLOCATION}|" /etc/adduser.conf
|
||||
# change to BASH shell for root and all normal users
|
||||
awk -F'[/:]' '{if (\$3 >= 1000 && \$3 != 65534 || \$3 == 0) print \$1}' /etc/passwd | xargs -L1 chsh -s \$(grep /bash\$ /etc/shells | tail -1)
|
||||
exit 0
|
||||
END
|
||||
|
||||
cp -R "${SRC}"/cache/sources/oh-my-zsh "${tmp_dir}/${armbian_zsh_dir}"/etc/
|
||||
cp -R "${SRC}"/cache/sources/evalcache "${tmp_dir}/${armbian_zsh_dir}"/etc/oh-my-zsh/plugins
|
||||
cp "${tmp_dir}/${armbian_zsh_dir}"/etc/oh-my-zsh/templates/zshrc.zsh-template "${tmp_dir}/${armbian_zsh_dir}"/etc/skel/.zshrc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue