mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-29 06:18:14 +00:00
24 lines
1.4 KiB
Plaintext
24 lines
1.4 KiB
Plaintext
start:xdcp_nonroot_user
|
|
label:cn_os_ready,parallel_cmds
|
|
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "useradd -m xyzzy";else useradd -m xyzzy;fi
|
|
check:rc==0
|
|
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "bash -c \"( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )\"";else bash -c "( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )";fi
|
|
check:rc==0
|
|
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh";else chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh;fi
|
|
check:rc==0
|
|
cmd:xdsh $$CN "useradd -m xyzzy"
|
|
check:rc==0
|
|
cmd:xdsh $$CN "( cd ~ && tar cf - .ssh ) | ( cd ~xyzzy && tar xf - )"
|
|
check:rc==0
|
|
cmd:xdsh $$CN "chown -R xyzzy ~xyzzy/.ssh"
|
|
check:rc==0
|
|
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "su -c \"xdcp $$CN /etc/sysctl.conf /tmp/sysctl.conf\" - xyzzy";else su -c "xdcp $$CN /etc/sysctl.conf /tmp/sysctl.conf" - xyzzy;fi
|
|
check:rc==0
|
|
cmd:xdsh $$CN "stat -c '%U' /tmp/sysctl.conf"
|
|
check:output=~xyzzy
|
|
cmd:xdsh $$CN "userdel xyzzy"
|
|
check:rc==0
|
|
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $$SN "userdel xyzzy";else userdel xyzzy;fi
|
|
check:rc==0
|
|
end
|