mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-21 14:21:02 +02:00
pentoo-livecd: hopefully start X correctly, on request
This commit is contained in:
parent
f4d4008d4e
commit
ffd03d1d7f
2 changed files with 16 additions and 1 deletions
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
Loading…
Reference in a new issue