2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-11 07:40:11 +00:00

Ensure mypostscript has permission 700 (#3847)

Only root needs to run this script
This commit is contained in:
Matt Ezell
2017-09-06 21:18:35 -04:00
committed by yangsong
parent 716d777dc2
commit 72d99850e2
9 changed files with 10 additions and 9 deletions

View File

@ -77,7 +77,7 @@ do
done
chmod +x /xcatpost/mypostscript
chmod 700 /xcatpost/mypostscript
GOTIT=1
break
fi

View File

@ -68,7 +68,7 @@ do
done
# Make executable
chmod +x /xcatpost/mypostscript
chmod 700 /xcatpost/mypostscript
GOTIT=1
break
fi

View File

@ -68,7 +68,7 @@ do
done
# Make executable
chmod +x /xcatpost/mypostscript
chmod 700 /xcatpost/mypostscript
GOTIT=1
break
fi

View File

@ -72,7 +72,7 @@ do
done
# Make executable
chmod +x /tmp/mypostscript
chmod 700 /tmp/mypostscript
GOTIT=1
break
fi

View File

@ -73,7 +73,7 @@ do
done
# Make executable
chmod +x /tmp/mypostscript
chmod 700 /tmp/mypostscript
GOTIT=1
break
fi

View File

@ -116,7 +116,7 @@ if [ "$?" = "0" ]; then
msgutil_r "$MASTER_IP" "debug" "precreated mypostscript downloaded successfully" "/var/log/xcat/xcat.log"
fi
mv /xcatpost/mypostscript.$NODE /xcatpost/mypostscript
chmod +x /xcatpost/mypostscript
chmod 700 /xcatpost/mypostscript
fi
USEOPENSSLFORXCAT=1 #Though this is the only method going forward, flag to allow backward compatibility with 2.2 generated netboot images
@ -404,7 +404,7 @@ if [ \"\$return_value\" -ne \"0\" ]; then
fi
" >> /xcatpost/mypostscript
chmod 755 /xcatpost/mypostscript
chmod 700 /xcatpost/mypostscript
export ARCH=#TABLE:nodetype:THISNODE:arch#
export CONSOLEPORT=#TABLEBLANKOKAY:nodehm:THISNODE:serialport#

View File

@ -149,7 +149,7 @@ fi
#config static ip address for mgt interface
echo './confignics -s' >> ./mypostscript
chmod +x ./mypostscript
chmod 700 ./mypostscript
./mypostscript
rc=$?
if [ "$rc" != "0" ]; then

View File

@ -52,6 +52,7 @@ cat /tmp/resp.xml | egrep '<data>' | sed -e 's/<[^>]*>//g'|egrep -v '^ *$'|sed
#will be supported if there is requrement on this
sed -i -e "/# postscripts-start-here/,$ d" /xcatpost/mypostscript
chmod 700 /xcatpost/mypostscript
rm -f /tmp/req.xml
rm -f /tmp/resp.xml
exit 0

View File

@ -963,7 +963,7 @@ if [ "$MODE" = "1" ] || [ "$MODE" = "2" ] || [ "$MODE" = "5" ]; then
echo "exit \$return_value" >> /$xcatpost/mypostscript
fi
chmod +x /$xcatpost/mypostscript
chmod 700 /$xcatpost/mypostscript
if [ -x /$xcatpost/mypostscript ];then
echolog "debug" "running /$xcatpost/mypostscript"
/$xcatpost/mypostscript