Add initial files.
This commit is contained in:
26
airootfs/etc/systemd/scripts/choose-mirror
Executable file
26
airootfs/etc/systemd/scripts/choose-mirror
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
get_cmdline() {
|
||||
local param
|
||||
for param in $(< /proc/cmdline); do
|
||||
case "${param}" in
|
||||
$1=*) echo "${param##*=}";
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
mirror=$(get_cmdline mirror)
|
||||
[[ $mirror = auto ]] && mirror=$(get_cmdline archiso_http_srv)
|
||||
[[ $mirror ]] || exit 0
|
||||
|
||||
mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
|
||||
cat >/etc/pacman.d/mirrorlist << EOF
|
||||
#
|
||||
# Arch Linux repository mirrorlist
|
||||
# Generated by archiso
|
||||
#
|
||||
|
||||
Server = ${mirror%%/}/\$repo/os/\$arch
|
||||
EOF
|
10
airootfs/etc/systemd/system/choose-mirror.service
Normal file
10
airootfs/etc/systemd/system/choose-mirror.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Choose mirror from the kernel command line
|
||||
ConditionKernelCommandLine=mirror
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/etc/systemd/scripts/choose-mirror
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
8
airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount
Normal file
8
airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount
Normal file
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Temporary /etc/pacman.d/gnupg directory
|
||||
|
||||
[Mount]
|
||||
What=tmpfs
|
||||
Where=/etc/pacman.d/gnupg
|
||||
Type=tmpfs
|
||||
Options=mode=0755
|
@@ -0,0 +1,3 @@
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux
|
15
airootfs/etc/systemd/system/pacman-init.service
Normal file
15
airootfs/etc/systemd/system/pacman-init.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Initializes Pacman keyring
|
||||
Wants=haveged.service
|
||||
After=haveged.service
|
||||
Requires=etc-pacman.d-gnupg.mount
|
||||
After=etc-pacman.d-gnupg.mount
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/pacman-key --init
|
||||
ExecStart=/usr/bin/pacman-key --populate archlinux
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user