summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/setup_Debian.sh2
-rwxr-xr-xtools/setup_RedHat.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/setup_Debian.sh b/tools/setup_Debian.sh
index b04369052..f5fd7ed43 100755
--- a/tools/setup_Debian.sh
+++ b/tools/setup_Debian.sh
@@ -4,7 +4,7 @@ set -o xtrace
set -o errexit
function setup_disk {
- if [ ! -f /swapfile ]; then
+ if [[ -f /etc/nodepool/provider && ! -f /swapfile ]]; then
sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096
sudo chmod 0600 /swapfile
diff --git a/tools/setup_RedHat.sh b/tools/setup_RedHat.sh
index 3a7345b53..2bd3bb09f 100755
--- a/tools/setup_RedHat.sh
+++ b/tools/setup_RedHat.sh
@@ -4,7 +4,7 @@ set -o xtrace
set -o errexit
function setup_disk {
- if [ ! -f /swapfile ]; then
+ if [[ -f /etc/nodepool/provider && ! -f /swapfile ]]; then
sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096
sudo chmod 0600 /swapfile