You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
948 B

#!/bin/bash
set -e # exit on error
set -o pipefail # exit on pipeline error
set -u # treat unset variable as error
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
echo "keyboard-configuration keyboard-configuration/variant select English (US)" | debconf-set-selections
# install packages
if [ -f $SCRIPT_DIR/$PACKAGE_VARIANT.list ]; then
#sudo DEBIAN_FRONTEND=$DEBIAN_FRONTEND_TYPE \
$APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1
fi
cat <<EOF >/usr/lib/systemd/system/xorg.service
[Unit]
Description=X-Window
ConditionKernelCommandLine=!text
After=systemd-user-sessions.service
[Service]
ExecStart=/bin/su --login -c "/usr/bin/startx -- :0 vt7 -ac -nolisten tcp" $USER_NAME
EOF
cp -rT /etc/skel /home/$USER_NAME
cp -rT /etc/skel /root
chown 1000:1000 /home/$USER_NAME
chown -R 1000:1000 /home/$USER_NAME
chown 0:0 /root
chown -R 0:0 /root