pentoo-livecd: hopefully start X correctly, on request

This commit is contained in:
Rick Farina (Zero_Chaos) 2020-08-19 16:57:42 -04:00
parent f4d4008d4e
commit ffd03d1d7f
No known key found for this signature in database
GPG key ID: A29433C0AA431DDC
2 changed files with 16 additions and 1 deletions

View file

@ -5,6 +5,16 @@ setpassword(){
sudo passwd pentoo
}
f_yes_or_no(){
read -rp "[y/n] " input
case ${input} in
y|n) printf "${input}\n";;
*) printf "only y or n accepted\n"
f_yes_or_no
;;
esac
}
changeuser="${USER}"
if sudo grep -q "${changeuser}:!" /etc/shadow; then
@ -40,3 +50,8 @@ if ! sudo grep -q "{changeuser}:!" /etc/shadow; then
grep -v livecd-setpass ~/.bashrc > .bashrc_setpass_temp
mv .bashrc_setpass_temp ~/.bashrc
fi
printf "Would you like to securely start X now?\n"
choose_x=$(f_yes_or_no)
if [ "${choose_x}" = "y" ]; then
/etc/init.d/xdm start && exit 0
fi

View file

@ -37,7 +37,7 @@ src_install() {
#/usr/sbin
newsbin "${FILESDIR}"/flushchanges-2018.0 flushchanges
newsbin "${FILESDIR}"/makemo-2019.0 makemo
newsbin "${FILESDIR}"/livecd-setpass-r1 livecd-setpass
newsbin "${FILESDIR}"/livecd-setpass-r2 livecd-setpass
newinitd "${FILESDIR}"/binary-driver-handler.initd-2020.2 binary-driver-handler