summaryrefslogtreecommitdiff
path: root/configs/profile/root-image/root/customize_root_image.sh
diff options
context:
space:
mode:
Diffstat (limited to 'configs/profile/root-image/root/customize_root_image.sh')
-rwxr-xr-xconfigs/profile/root-image/root/customize_root_image.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/configs/profile/root-image/root/customize_root_image.sh b/configs/profile/root-image/root/customize_root_image.sh
index de5481b..7505d8b 100755
--- a/configs/profile/root-image/root/customize_root_image.sh
+++ b/configs/profile/root-image/root/customize_root_image.sh
@@ -1,5 +1,16 @@
#!/bin/bash
+readonly ISO_REPO_DEFINITION="[isorepo]\nSigLevel = Optional TrustAll\nServer = file:///isorepo/"
+readonly NETINSTALL_MSG="To install Parabola, the system must be connected to the internet."
+readonly COMPLETE_MSG="This ISO is capable of installing a complete Parabola system\n\
+>>>>without a connection to the internet. If you would like to fetch\n\
+>>>>the latest packages from the internet, run the following command\n\
+>>>>before beginning the install:\n\
+ # cp /etc/pacman-online.conf /etc/pacman.conf"
+[ "${enable_offline_install}" == 'false' ] && readonly NETWORK_MSG=${NETINSTALL_MSG} || \
+ readonly NETWORK_MSG=${COMPLETE_MSG}
+
+
set -e -u
sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
@@ -17,7 +28,14 @@ chmod 750 /etc/sudoers.d
chmod 440 /etc/sudoers.d/g_wheel
sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist
+if [ "${enable_offline_install}" == 'true' ]
+then echo -e "${ISO_REPO_DEFINITION}" >> /etc/pacman.conf
+ mv /etc/pacman.conf /etc/pacman-online.conf
+ cp /etc/pacman-offline.conf /etc/pacman.conf
+else rm /etc/pacman-offline.conf
+fi
systemctl enable multi-user.target pacman-init.service choose-mirror.service
-sed -i "s|_EDITION_TITLE_|${iso_title}|" /etc/motd
+sed -i "s|_EDITION_TITLE_|${iso_title}|" /etc/motd
+sed -i "s|_NETWORK_MSG_|${NETWORK_MSG}| ; s|^>>>>\(.*\)| \1|g" /etc/motd