Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
0134954f
Commit
0134954f
authored
Oct 26, 2020
by
Igor Pecovnik
Browse files
Improve ZSH interactive install support and add zsh as default to adduser.conf
parent
28fadf1d
Changes
1
Show whitespace changes
Inline
Side-by-side
debian-config-jobs
View file @
0134954f
...
...
@@ -914,6 +914,7 @@ function jobs ()
mkdir
-p
/etc/skel/.oh-my-zsh/cache
# change shell for future users
sed
-i
"s/^SHELL=.*/SHELL=
\/
usr
\/
bin
\/
zsh/"
/etc/default/useradd
sed
-i
"s/^DSHELL=.*/DSHELL=
\/
usr
\/
bin
\/
zsh/"
/etc/adduser.conf
# we have common settings
sed
-i
"s/^export ZSH=.*/export ZSH=
\/
etc
\/
oh-my-zsh/"
/etc/skel/.zshrc
# user cache
...
...
@@ -931,7 +932,7 @@ function jobs ()
cp
/etc/skel/.zshrc /root/.zshrc
# and for selected normal user
add_choose_user
if
[
-n
"
$CHOSEN_USER
"
]
;
then
if
[
[
-n
"
$CHOSEN_USER
"
&&
-z
$scripted
]
]
;
then
chsh
-s
$(
grep
/zsh
$
/etc/shells |
tail
-1
)
$CHOSEN_USER
# copy cache directory
cp
-R
--attributes-only
/etc/skel/.oh-my-zsh /home/
$CHOSEN_USER
/.oh-my-zsh
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment