summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpxeboot.check14
1 files changed, 11 insertions, 3 deletions
diff --git a/pxeboot.check b/pxeboot.check
index 885a0541..468b76e2 100755
--- a/pxeboot.check
+++ b/pxeboot.check
@@ -2,6 +2,7 @@
import itertools
import os
+import subprocess
import sys
flatten = itertools.chain.from_iterable
@@ -66,11 +67,18 @@ else:
if all(o in os.environ for o in opt_set))
except ValueError as e:
- print('More than one candidate for PXEBOOT_MODE, please '
- 'set a value for it. Type `morph help pxeboot.write for '
- 'more info')
+ print ('More than one candidate for PXEBOOT_MODE, please '
+ 'set a value for it. Type `morph help pxeboot.write for '
+ 'more info')
sys.exit(1)
if mode not in valid_modes:
print('%s is not a valid PXEBOOT_MODE' % mode)
sys.exit(1)
+
+if mode != 'existing-server':
+ if subprocess.call(['systemctl', 'status', 'nfs-server']) != 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)