2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-21 10:40:24 +00:00

Simplify foo.bar and invoke and test it one time without input value.

This commit is contained in:
Wai Yee Wong
2020-04-16 17:55:17 -04:00
parent 9920a4c7d9
commit e864af7855

View File

@@ -670,18 +670,14 @@ label:others,updatenode
description:This is to test that postscripts in nested sub-directories can execute on CN by running "updatenode -P" on MN (xcat-core issue #6579).
cmd:mkdir -p /install/postscripts/dir1/dir2/dir3
check:rc==0
cmd:echo -e '#!/bin/bash\n\nif [[ $1 == 1 ]] \nthen\n echo \"The number is ONE\";\nelse\n echo \"The number is NOT 1\"; \nfi\nexit 0;'> /install/postscripts/dir1/dir2/dir3/foo.bar
cmd:echo -e '#!/bin/bash\n\necho \"Execute permission is set.\"\nexit 0'> /install/postscripts/dir1/dir2/dir3/foo.bar
check:rc==0
cmd:chmod 755 /install/postscripts/dir1/dir2/dir3/foo.bar
check:rc==0
cmd:chdef -p -t node -o $$CN postscripts="dir1/dir2/dir3/foo.bar 1,dir1/dir2/dir3/foo.bar 0"
cmd:updatenode $$CN -P "dir1/dir2/dir3/foo.bar"
check:rc==0
cmd:updatenode $$CN -P "dir1/dir2/dir3/foo.bar 1"
check:output=~ Execute permission is set
check:rc==0
check:output=~ The number is ONE
cmd:updatenode $$CN -P "dir1/dir2/dir3/foo.bar 0"
check:rc==0
check:output=~ The number is NOT 1
cmd:xdsh $$CN "find /xcatpost/dir1/dir2/dir3/foo.bar -type f -perm -111 | egrep 'foo'"
check:rc==0
cmd:rm -f /install/postscripts/dir1/dir2/dir3/foo.bar
@@ -692,6 +688,4 @@ cmd:xdsh $$CN "rm -f /xcatpost/dir1/dir2/dir3/foo.bar"
check:rc==0
cmd:xdsh $$CN "cd /xcatpost; rmdir -p dir1/dir2/dir3"
check:rc==0
cmd:chdef -m -t node -o $$CN postscripts="dir1/dir2/dir3/foo.bar 1,dir1/dir2/dir3/foo.bar 0"
check:rc==0
end