summaryrefslogtreecommitdiff
path: root/pxeboot.check
diff options
context:
space:
mode:
Diffstat (limited to 'pxeboot.check')
-rwxr-xr-xpxeboot.check10
1 files changed, 10 insertions, 0 deletions
diff --git a/pxeboot.check b/pxeboot.check
index fabe8138..611708a9 100755
--- a/pxeboot.check
+++ b/pxeboot.check
@@ -2,6 +2,7 @@
import itertools
import os
+import subprocess
import sys
flatten = itertools.chain.from_iterable
@@ -74,3 +75,12 @@ else:
if mode not in valid_modes:
print('%s is not a valid PXEBOOT_MODE' % mode)
sys.exit(1)
+
+if mode != 'existing-server':
+ with open(os.devnull, 'w') as devnull:
+ if subprocess.call(['systemctl', 'is-active', 'nfs-server'],
+ stdout=devnull) != 0:
+ print ('ERROR: nfs-server.service is not running and is needed '
+ 'for this deployment. Please, run `systemctl start nfs-server` '
+ 'and try `morph deploy` again.')
+ sys.exit(1)