Put chroot provision into its own preflight
This commit is contained in:
parent
65636b0ba8
commit
76082b945d
14
install.sh
14
install.sh
@ -6,19 +6,6 @@
|
|||||||
export PATH="$HOME/.local/share/omarchy/bin:$PATH"
|
export PATH="$HOME/.local/share/omarchy/bin:$PATH"
|
||||||
OMARCHY_INSTALL=~/.local/share/omarchy/install
|
OMARCHY_INSTALL=~/.local/share/omarchy/install
|
||||||
|
|
||||||
# Chroot installations have some differences
|
|
||||||
if ! cmp -s /proc/1/root/ / 2>/dev/null; then
|
|
||||||
export OMARCHY_CHROOT_INSTALL=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
chrootable_systemctl_enable() {
|
|
||||||
if [ -n "${OMARCHY_CHROOT_INSTALL:-}" ]; then
|
|
||||||
sudo systemctl enable $1
|
|
||||||
else
|
|
||||||
sudo systemctl enable --now $1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Give people a chance to retry running the installation
|
# Give people a chance to retry running the installation
|
||||||
catch_errors() {
|
catch_errors() {
|
||||||
echo -e "\n\e[31mOmarchy installation failed!\e[0m"
|
echo -e "\n\e[31mOmarchy installation failed!\e[0m"
|
||||||
@ -41,6 +28,7 @@ show_subtext() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Install prerequisites
|
# Install prerequisites
|
||||||
|
source $OMARCHY_INSTALL/preflight/chroot.sh
|
||||||
source $OMARCHY_INSTALL/preflight/mirrorlist.sh
|
source $OMARCHY_INSTALL/preflight/mirrorlist.sh
|
||||||
source $OMARCHY_INSTALL/preflight/gum.sh
|
source $OMARCHY_INSTALL/preflight/gum.sh
|
||||||
source $OMARCHY_INSTALL/preflight/guard.sh
|
source $OMARCHY_INSTALL/preflight/guard.sh
|
||||||
|
12
install/preflight/chroot.sh
Normal file
12
install/preflight/chroot.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Chroot installations have some differences
|
||||||
|
if ! cmp -s /proc/1/root/ / 2>/dev/null; then
|
||||||
|
export OMARCHY_CHROOT_INSTALL=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chrootable_systemctl_enable() {
|
||||||
|
if [ -n "${OMARCHY_CHROOT_INSTALL:-}" ]; then
|
||||||
|
sudo systemctl enable $1
|
||||||
|
else
|
||||||
|
sudo systemctl enable --now $1
|
||||||
|
fi
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user