start:xdcp_nonroot_user
label:cn_os_ready,parallel_cmds
cmd:lsdef -t site -z clustersite > /tmp/site.stanza
cmd:chdef -t site SNsyncfiledir=/tmp
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $servicenode "useradd -m xyzzy";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 $servicenode "type apt-get && apt-get install -y tar";fi
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $servicenode "type yum && yum install -y tar"; fi
cmd:servicenode=`lsdef $$CN |grep servicenode |awk -F= '{print $2}'`; if [ -n "$servicenode" ]; then xdsh $servicenode "bash -c \"( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )\"";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 $servicenode "chown -R xyzzy ~xyzzy/.xcat ~xyzzy/.ssh";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 "type apt-get && apt-get install -y tar"
cmd:xdsh $$CN "type yum && yum install -y tar"
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:su -c "xdcp $$CN /etc/sysctl.conf /tmp/sysctl.conf" - xyzzy
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 $servicenode "userdel xyzzy";userdel xyzzy;else userdel xyzzy;fi
check:rc==0
cmd:if [ -e /tmp/site.standa ]; then cat /tmp/site.standa | mkdef -z -f; rm -rf /tmp/site.standa; fi
end
