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 16:32:03 +08:00
parent ebee9deebe
commit 6a703f9ea7
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