summaryrefslogtreecommitdiff
path: root/configs/profile/airootfs/root
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2017-10-16 23:40:09 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2019-10-19 12:41:39 -0400
commit4ef2a02fe8276e722fe961fc42c0cbf4cba29d22 (patch)
tree6209c502d877ee16325c0439a2ccccdebb4d4e45 /configs/profile/airootfs/root
parent159f348b7cb868d58a688844b8599c41a391a319 (diff)
enable offline install
Diffstat (limited to 'configs/profile/airootfs/root')
-rwxr-xr-xconfigs/profile/airootfs/root/customize_airootfs.sh27
1 files changed, 23 insertions, 4 deletions
diff --git a/configs/profile/airootfs/root/customize_airootfs.sh b/configs/profile/airootfs/root/customize_airootfs.sh
index 2864122..3233d9c 100755
--- a/configs/profile/airootfs/root/customize_airootfs.sh
+++ b/configs/profile/airootfs/root/customize_airootfs.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
@@ -11,9 +22,6 @@ usermod -s /usr/bin/zsh root 2> /dev/null
cp -aT /etc/skel/ /root/
chmod 700 /root
-[[ -n "$(id parabola 2> /dev/null)" ]] && userdel -r parabola 2> /dev/null
-useradd -m -p "" -g users -G "adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel" -s /usr/bin/zsh parabola
-
sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config
sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist
sed -i 's/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf
@@ -22,7 +30,18 @@ sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf
sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf
+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
+
+[[ -n "$(id parabola 2> /dev/null)" ]] && userdel -r parabola 2> /dev/null
+useradd -m -p "" -g users -G "adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel" -s /usr/bin/zsh parabola
+
systemctl enable pacman-init.service choose-mirror.service
systemctl set-default multi-user.target
-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