diff --git a/hosts/Infini-DESKTOP/prep.bash b/hosts/Infini-DESKTOP/prep.bash index a8f7adf..f950119 100755 --- a/hosts/Infini-DESKTOP/prep.bash +++ b/hosts/Infini-DESKTOP/prep.bash @@ -7,7 +7,12 @@ PART=$DISK$2 sudo mkdir -p /mnt # boilerplate ends here - +# [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::mount_check][mount_check]]][mount_check]] +if mountpoint -q -- "/mnt"; then + echo "ERROR: /mnt is a mounted filesystem, aborting" + exit 1 +fi +# mount_check ends here # [[[[file:/etc/nixos/hosts/Infini-DESKTOP/readme.org::partitioning][partitioning]]][partitioning]] echo "LOG: Partitioning $DISK" diff --git a/hosts/Infini-DESKTOP/readme.org b/hosts/Infini-DESKTOP/readme.org index e7dfd6d..eea0f5c 100644 --- a/hosts/Infini-DESKTOP/readme.org +++ b/hosts/Infini-DESKTOP/readme.org @@ -22,7 +22,7 @@ Setup for my main desktop computer, using an Nvidia GPU and the =desktop= form f #+BEGIN_SRC bash :tangle prep.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb <> -<> +<> <> diff --git a/hosts/Infini-FRAMEWORK/prep.bash b/hosts/Infini-FRAMEWORK/prep.bash index 5f6815d..b753b00 100755 --- a/hosts/Infini-FRAMEWORK/prep.bash +++ b/hosts/Infini-FRAMEWORK/prep.bash @@ -7,7 +7,12 @@ PART=$DISK$2 sudo mkdir -p /mnt # boilerplate ends here - +# [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::mount_check][mount_check]]][mount_check]] +if mountpoint -q -- "/mnt"; then + echo "ERROR: /mnt is a mounted filesystem, aborting" + exit 1 +fi +# mount_check ends here # [[[[file:/etc/nixos/hosts/Infini-FRAMEWORK/readme.org::partitioning][partitioning]]][partitioning]] echo "LOG: Partitioning $DISK" diff --git a/hosts/Infini-FRAMEWORK/readme.org b/hosts/Infini-FRAMEWORK/readme.org index 07d8868..2d83da2 100644 --- a/hosts/Infini-FRAMEWORK/readme.org +++ b/hosts/Infini-FRAMEWORK/readme.org @@ -32,7 +32,7 @@ My main laptop, the [[https://frame.work][Framework Laptop]]. #+BEGIN_SRC bash :tangle prep.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb <> -<> +<> <> diff --git a/hosts/Infini-SERVER/prep.bash b/hosts/Infini-SERVER/prep.bash index fb38ab6..c2a01bb 100755 --- a/hosts/Infini-SERVER/prep.bash +++ b/hosts/Infini-SERVER/prep.bash @@ -7,7 +7,12 @@ PART=$DISK$2 sudo mkdir -p /mnt # boilerplate ends here - +# [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::mount_check][mount_check]]][mount_check]] +if mountpoint -q -- "/mnt"; then + echo "ERROR: /mnt is a mounted filesystem, aborting" + exit 1 +fi +# mount_check ends here # [[[[file:/etc/nixos/hosts/Infini-SERVER/readme.org::partitioning][partitioning]]][partitioning]] echo "LOG: Partitioning $DISK" diff --git a/hosts/Infini-SERVER/readme.org b/hosts/Infini-SERVER/readme.org index 3295995..0faf758 100644 --- a/hosts/Infini-SERVER/readme.org +++ b/hosts/Infini-SERVER/readme.org @@ -22,7 +22,7 @@ Setup for my main server hosting computer, using an Nvidia GPU and the =server= #+BEGIN_SRC bash :tangle prep.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb <> -<> +<> <> diff --git a/hosts/Infini-STICK/readme.org b/hosts/Infini-STICK/readme.org index 3fa199d..57c4dc6 100644 --- a/hosts/Infini-STICK/readme.org +++ b/hosts/Infini-STICK/readme.org @@ -21,7 +21,7 @@ Setup with a wide array of hardware compatibility, specifically using the =porta #+BEGIN_SRC bash :tangle setup.bash :shebang "#!/usr/bin/env bash" :noweb yes :comments noweb <> -<> +<> <> diff --git a/hosts/Infini-STICK/setup.bash b/hosts/Infini-STICK/setup.bash index e8195b3..b69cd2f 100755 --- a/hosts/Infini-STICK/setup.bash +++ b/hosts/Infini-STICK/setup.bash @@ -6,7 +6,12 @@ DISK=$1 sudo mkdir -p /mnt # boilerplate ends here - +# [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::mount_check][mount_check]]][mount_check]] +if mountpoint -q -- "/mnt"; then + echo "ERROR: /mnt is a mounted filesystem, aborting" + exit 1 +fi +# mount_check ends here # [[[[file:/etc/nixos/hosts/Infini-STICK/readme.org::partitioning][partitioning]]][partitioning]] echo "LOG: Partitioning $DISK"