melawy-archiso-config/Melawy-Linux-Developer-Edit.../airootfs/usr/local/bin/start-data-flash.sh

45 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
if [[ "$UID" != 0 ]]; then
echo "USER NOT ROOT"
sudo "$0"
exit
else
echo "USER IS ROOT"
fi
localectl set-locale LANG=ru_RU.UTF-8
localectl set-keymap --no-convert ruwin_alt_sh-UTF-8
localectl --no-convert set-x11-keymap us,ru "" "" grp:alt_shift_toggle
locale-gen
timedatectl set-timezone Asia/Yekaterinburg
if [ -f "/flash/etc/pacman.conf" ]; then
cp -vf /flash/etc/pacman.conf /etc/
fi
if [ -f "/flash/etc/sddm.conf.d/kde_settings.conf" ]; then
cp -vf /flash/etc/sddm.conf.d/kde_settings.conf /etc/sddm.conf.d/
fi
userdbctl user liveuser
if [[ 0 -eq "$?" ]]; then
if [ -d "/flash/home/liveuser" ]; then
usermod --home /flash/home/liveuser liveuser
usermod --password "$(mkpasswd --method=yescrypt liveuser)" liveuser
fi
if [ -d "/flash/home/liveuser/.cache/" ]; then
rm -vrf /flash/home/liveuser/.cache/*
fi
fi
userdbctl user demo
if [[ 0 -ne "$?" ]]; then
useradd --base-dir /flash/home --comment Demo --create-home --password "$(mkpasswd --method=yescrypt demo)" --shell /bin/bash demo
fi
# systemctl restart display-manager