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

fix 4513 enable root logon permission in remoteshell,4522 support remove os pkgs in ubuntu pkg list

This commit is contained in:
chudegao
2015-01-22 18:09:44 +08:00
parent 076b8bd0c8
commit d547d83bdf
2 changed files with 8 additions and 5 deletions

View File

@@ -136,7 +136,7 @@ sub subvars {
# append preseed directive lines
while (<PKGLISTFILE>) {
chomp $_;
if (/^\s*#.*/ ){
if ((/^\s*#.*/ ) || ( $_ =~ /^-/ )){
next;
}
$pkglist .= " " . $_;

View File

@@ -55,10 +55,13 @@ then
sed -i '/MaxStartups /'d /etc/ssh/sshd_config
echo "MaxStartups 1024" >>/etc/ssh/sshd_config
if [ "$SETUPFORPCM" = "1" ];then
sed -i '/PasswordAuthentication /'d /etc/ssh/sshd_config
echo "PasswordAuthentication yes" >>/etc/ssh/sshd_config
if [ "$SETUPFORPCM" = "1" ]; then
if [[ $OSVER == sles* ]];then
sed -i '/PasswordAuthentication /'d /etc/ssh/sshd_config
echo "PasswordAuthentication yes" >>/etc/ssh/sshd_config
elif [[ $OSVER == ubuntu* ]];then
sed -i 's/^PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
fi
fi
fi