-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
31 lines (29 loc) · 1.75 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
all: default ssh
default:
rm -rf archiso
cp -r /usr/share/archiso/configs/releng/ archiso
mkdir -p archiso/airootfs/usr/bin archiso/out
cp arch-install.sh archiso/airootfs/usr/bin/arch-install
sed -i '/^file_permissions=.*/a\ \ ["\/usr\/bin\/arch-install"]="0:0:755"' archiso/profiledef.sh
echo 'if [ "$$(tty)" = "/dev/tty1" ]; then arch-install; fi' >> archiso/airootfs/root/.zlogin
echo 'dialog' >> archiso/packages.x86_64
echo 'networkmanager' >> archiso/packages.x86_64
mkdir -p archiso/airootfs/etc/systemd/system/multi-user.target.wants
ln -s /usr/lib/systemd/system/NetworkManager.service archiso/airootfs/etc/systemd/system/multi-user.target.wants/NetworkManager.service
mkarchiso -v -w /tmp/archiso-work archiso -L "ARINST" -A "arch-install"
mv out/*.iso ./arch-install.iso
ssh:
rm -rf archiso
cp -r /usr/share/archiso/configs/releng/ archiso
echo "sed -i 's/#\(PermitEmptyPasswords \).\+/\1yes/' /etc/ssh/sshd_config" >> archiso/airootfs/root/customize_airootfs.sh
echo "systemctl enable sshd" >> archiso/airootfs/root/customize_airootfs.sh
mkdir -p archiso/airootfs/usr/bin archiso/out
cp arch-install.sh archiso/airootfs/usr/bin/arch-install
sed -i '/^file_permissions=.*/a\ \ ["\/usr\/bin\/arch-install"]="0:0:755"' archiso/profiledef.sh
echo 'if [ "$$(tty)" = "/dev/tty1" ]; then arch-install; fi' >> archiso/airootfs/root/.zlogin
echo 'dialog' >> archiso/packages.x86_64
echo 'networkmanager' >> archiso/packages.x86_64
mkdir -p archiso/airootfs/etc/systemd/system/multi-user.target.wants
ln -s /usr/lib/systemd/system/NetworkManager.service archiso/airootfs/etc/systemd/system/multi-user.target.wants/NetworkManager.service
mkarchiso -v -w /tmp/archiso-work-ssh archiso -L "ARINSTSSH" -A "arch-install-ssh"
mv out/*.iso ./arch-install-ssh.iso