mirror of
https://github.com/tuxdotrs/tuxOS.git
synced 2025-07-07 18:26:34 +05:30
updated base
This commit is contained in:
34
airootfs/root/.automated_script.sh
Executable file
34
airootfs/root/.automated_script.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
script_cmdline ()
|
||||
{
|
||||
local param
|
||||
for param in $(< /proc/cmdline); do
|
||||
case "${param}" in
|
||||
script=*) echo "${param#*=}" ; return 0 ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
automated_script ()
|
||||
{
|
||||
local script rt
|
||||
script="$(script_cmdline)"
|
||||
if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then
|
||||
if [[ "${script}" =~ ^((http|https|ftp)://) ]]; then
|
||||
curl "${script}" --location --retry-connrefused --retry 10 -s -o /tmp/startup_script >/dev/null
|
||||
rt=$?
|
||||
else
|
||||
cp "${script}" /tmp/startup_script
|
||||
rt=$?
|
||||
fi
|
||||
if [[ ${rt} -eq 0 ]]; then
|
||||
chmod +x /tmp/startup_script
|
||||
/tmp/startup_script
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ $(tty) == "/dev/tty1" ]]; then
|
||||
automated_script
|
||||
fi
|
6
airootfs/root/.zlogin
Normal file
6
airootfs/root/.zlogin
Normal file
@ -0,0 +1,6 @@
|
||||
# fix for screen readers
|
||||
if grep -Fqa 'accessibility=' /proc/cmdline &> /dev/null; then
|
||||
setopt SINGLE_LINE_ZLE
|
||||
fi
|
||||
|
||||
~/.automated_script.sh
|
@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -u
|
||||
sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
|
||||
locale-gen
|
||||
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
|
||||
usermod -s /usr/bin/bash root
|
||||
cp -aT /etc/skel/ /root/
|
||||
|
||||
#Create Liveuser
|
||||
useradd -m -p "" -g users -G "adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel" -s /bin/bash liveuser
|
||||
#chmod 700 /root
|
||||
chown -R liveuser:users /home/liveuser
|
||||
|
||||
#Load Appletneo Configuration
|
||||
#cd /usr/bin
|
||||
#dconf load / < desktop.dconf
|
||||
#cd -
|
||||
|
||||
#tuxOS Name
|
||||
sed -i.bak 's/Arch Linux/tux OS/g' /usr/lib/os-release
|
||||
sed -i.bak 's/ID=arch/ID=tux/g' /usr/lib/os-release
|
||||
sed -i.bak 's/ID_LIKE=archlinux/ID_LIKE=tuxlinux/g' /usr/lib/os-release
|
||||
sed -i.bak 's/www.archlinux.org/www.appletneo.com/g' /usr/lib/os-release
|
||||
sed -i.bak 's/bbs.archlinux.org/www.appletneo.com/g' /usr/lib/os-release
|
||||
sed -i.bak 's/bugs.archlinux.org/www.appletneo.com/g' /usr/lib/os-release
|
||||
#cp /usr/lib/os-release /etc/os-release
|
||||
|
||||
sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config
|
||||
sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist
|
||||
sed -i 's/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf
|
||||
|
||||
sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf
|
||||
sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf
|
||||
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf
|
||||
|
||||
#systemctl enable pacman-init.service choose-mirror.service
|
||||
systemctl set-default multi-user.target
|
Reference in New Issue
Block a user