Add initial files.
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 @@
|
||||
#!/bin/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:// || "${script}" =~ ^ftp:// ]]; then
|
||||
wget "${script}" --retry-connrefused -q -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
|
1
airootfs/root/.zlogin
Normal file
1
airootfs/root/.zlogin
Normal file
@@ -0,0 +1 @@
|
||||
~/.automated_script.sh
|
23
airootfs/root/customize_airootfs.sh
Executable file
23
airootfs/root/customize_airootfs.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/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/zsh root
|
||||
cp -aT /etc/skel/ /root/
|
||||
chmod 700 /root
|
||||
|
||||
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
|
3
airootfs/root/install.txt
Normal file
3
airootfs/root/install.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
View this installation guide online at
|
||||
https://wiki.archlinux.org/index.php/Installation_Guide
|
||||
|
Reference in New Issue
Block a user