-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildiso.sh
executable file
·65 lines (59 loc) · 3.12 KB
/
buildiso.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# Copy the default config to the repo directory
echo "Copying baseline config..."
cp -r /usr/share/archiso/configs/baseline/ acervus-conf
cd acervus-conf || exit
echo "Done."
echo "Copying rootfs template..."
cp -r ../rootfs/ ./airootfs/
echo "Done."
echo "Modifying config..."
# Modify pacman.conf
cp ../pacman.conf ./pacman.conf
grep -o '^[^#]*' ../packages.txt > ./packages.x86_64
# Weird syntax removes comments
# Modify profiledef.sh
cp ../profiledef.sh ./profiledef.sh
echo "Done."
echo "Enabling various systemd units..."
##### Enable systemd units #####
# dhcpcd
echo "dhcpcd"
mkdir -p ./airootfs/etc/systemd/system/multi-user.target.wants
ln -sf ./airootfs/etc/systemd/system/multi-user.target.wants/dhcpcd.service /usr/lib/systemd/system/dhcpcd.service
# NetworkManager
echo "NetworkManager"
mkdir -p ./airootfs/etc/systemd/system/network-online.target.wants
ln -sf ./airootfs/etc/systemd/system/multi-user.target.wants/NetworkManager.service ./airootfs/usr/lib/systemd/system/NetworkManager.service
ln -sf ./airootfs/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service ./airootfs/usr/lib/systemd/system/NetworkManager-dispatcher.service
ln -sf ./airootfs/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service ./airootfs/usr/lib/systemd/system/NetworkManager-wait-online.service
# gdm
echo "gdm"
ln -sf ./airootfs/etc/systemd/system/display-manager.service ./airootfs/usr/lib/systemd/system/gdm.service
# acpid
echo "acpid"
ln -sf ./airootfs/etc/systemd/system/multi-user.target.wants/acpid.service ./airootfs/usr/lib/systemd/system/acpid.service
# avahi-daemon
echo "avahi-daemon"
mkdir -p ./airootfs/etc/systemd/system/sockets.target.wants
ln -sf ./airootfs/etc/systemd/system/dbus-org.freedesktop.Avahi.service ./airootfs/usr/lib/systemd/system/avahi-daemon.service
ln -sf ./airootfs/etc/systemd/system/multi-user.target.wants/avahi-daemon.service ./airootfs/usr/lib/systemd/system/avahi-daemon.service
ln -sf ./airootfs/etc/systemd/system/sockets.target.wants/avahi-daemon.socket ./airootfs/usr/lib/systemd/system/avahi-daemon.socket
# cups.service
echo "cups.service"
mkdir -p ./airootfs/etc/systemd/system/printer.target.wants
ln -sf ./airootfs/etc/systemd/system/printer.target.wants/cups.service ./airootfs/usr/lib/systemd/system/cups.service
ln -sf ./airootfs/etc/systemd/system/multi-user.target.wants/cups.service ./airootfs/usr/lib/systemd/system/cups.service
ln -sf ./airootfs/etc/systemd/system/sockets.target.wants/cups.socket ./airootfs/usr/lib/systemd/system/cups.socket
ln -sf ./airootfs/etc/systemd/system/multi-user.target.wants/cups.path ./airootfs/usr/lib/systemd/system/cups.path
# bluetooth
echo "bluetooth"
ln -sf ./airootfs/etc/systemd/system/dbus-org.bluez.service ./airootfs/usr/lib/systemd/system/bluetooth.service
ln -sf ./airootfs/etc/systemd/system/bluetooth.target.wants/bluetooth.service ./airootfs/usr/lib/systemd/system/bluetooth.service
#################################
echo "Done."
echo "Running mkarchiso on generated config..."
# Make the actual iso
mkarchiso -v -w ./acervus-iso-tmp "$(pwd)"
cd ..
echo "Done building Acervus. The ISO should be located in your current directory."