diff options
Diffstat (limited to 'configs/profile/root-image')
-rw-r--r-- | configs/profile/root-image/etc/motd | 2 | ||||
-rw-r--r-- | configs/profile/root-image/etc/pacman-offline.conf | 10 | ||||
-rwxr-xr-x | configs/profile/root-image/root/customize_root_image.sh | 20 |
3 files changed, 31 insertions, 1 deletions
diff --git a/configs/profile/root-image/etc/motd b/configs/profile/root-image/etc/motd index a2bf698..49febe9 100644 --- a/configs/profile/root-image/etc/motd +++ b/configs/profile/root-image/etc/motd @@ -3,6 +3,8 @@ [01;36m_EDITION_TITLE_[00;37m + _NETWORK_MSG_ + To install Parabola, the system must be connected to the internet. For help establishing an internet connection, enter this command: [01;37m lynx network.html [00;37m diff --git a/configs/profile/root-image/etc/pacman-offline.conf b/configs/profile/root-image/etc/pacman-offline.conf new file mode 100644 index 0000000..e6efcf1 --- /dev/null +++ b/configs/profile/root-image/etc/pacman-offline.conf @@ -0,0 +1,10 @@ +[options] +HoldPkg = pacman glibc +Architecture = auto +CheckSpace +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional + +[isorepo] +SigLevel = Optional TrustAll +Server = file:///isorepo/ 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 |