buildiso: allow to specify the user's login shell

This commit is contained in:
udeved 2016-05-13 21:24:47 +02:00
parent 6e395d7544
commit 5e1246d638
6 changed files with 19 additions and 2 deletions

View file

@ -129,6 +129,9 @@ overriding
# requires minimum 4.0 kernel on the build host and on iso in profile.conf
# use_overlayfs="true"
# the login shell
# login_shell=/bin/bash
################ deployiso ################
# the server url

View file

@ -94,6 +94,7 @@ display_settings(){
msg2 "iso_compression: %s" "${iso_compression}"
msg2 "iso_checksum: %s" "${iso_checksum}"
msg2 "use_overlayfs: %s" "${use_overlayfs}"
msg2 "login_shell: %s" "${login_shell}"
${verbose} && msg2 "iso_fs: %s" "${iso_fs}"
msg "BUILD QUEUE:"

View file

@ -78,6 +78,9 @@
# requires minimum 4.0 kernel on the build host and on iso in profile.conf
# use_overlayfs="false"
# the login shell
# login_shell=/bin/bash
################ deployiso ################
# the server url

View file

@ -272,6 +272,14 @@
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>login_shell=</varname></term>
<listitem><para>Accepts any login shell for the user, eg. /bin/zsh.
login_shell defaults to /bin/bash
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>

View file

@ -32,9 +32,9 @@ configure_user(){
# set up user and password
msg2 "Creating user ..."
if [[ -n ${password} ]];then
chroot $1 useradd -m -G ${addgroups} -p $(gen_pw) ${username}
chroot $1 useradd -m -G ${addgroups} -p $(gen_pw) -s ${login_shell} ${username}
else
chroot $1 useradd -m -G ${addgroups} ${username}
chroot $1 useradd -m -G ${addgroups} -s ${login_shell} ${username}
fi
}

View file

@ -283,6 +283,8 @@ init_buildiso(){
[[ -z ${use_overlayfs} ]] && use_overlayfs='true'
[[ -z ${profile_repo} ]] && profile_repo='manjaro-tools-iso-profiles'
[[ -z ${login_shell} ]] && login_shell='/bin/bash'
}
init_deployiso(){