# This makes parallel Slackware installations over SSH far easier to identify.
read -p "Host name (for window title): " winthostname
# We include additional control characters to enable us to set the window title
# even under GNU Screen:
echo -ne "\033P\033]0; Slackware ARM Installer on $winthostname \007\033\\"
# For Konsole:
echo -ne "\033]30; SlkIns: $winthostname \007"

# Enable awaitrootdev in the boot loader config to fix the issue
# with one of my RockPro64's where the USB hard drive takes ages
# to spin up some times:
touch /.enableawaitrootdev

##############################################################
# Add some post installation setup scripts for the
# Slackware ARM build machines.
# These are called from /usr/lib/setup/SeTconfig and also removed
# there once the OS installation has completed.
mkdir /armedslack-dev-installer-post.src

# $1 is where the OS is mounted within the installer (always /mnt).
#cat << 'EOF' > /armedslack-dev-installer-post.src/setup.armedslack-tmp-dev-configure-os
cat << 'EOF' > /armedslack-dev-installer-post.src/dev-configure-os
# This is NOT a recommended setting.  This is script for Slackware ARM build servers only.
sed -i 's?^#PermitRootLogin.*?PermitRootLogin Yes?g' $1/etc/ssh/sshd_config
EOF
chmod 755 /armedslack-dev-installer-post.src/*
##############################################################

# Set date and launch setup:
/usr/sbin/ntpdate clock.akamai.com && /bin/sh /sbin/fakedate && TERM=screen-256color setup
