File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,16 +11,14 @@ import (
1111
1212const postUpgradeScriptTemplate = `#!/bin/bash
1313sed 's/cobbler\.host.*/cobbler\.host = localhost/' -i /etc/rhn/rhn.conf;
14- grep uyuni_authentication_endpoint /etc/cobbler/settings.d/zz-uyuni.settings
15- if [ $? -eq 1 ]; then
14+ if grep -q uyuni_authentication_endpoint /etc/cobbler/settings.d/zz-uyuni.settings; then
1615 echo 'uyuni_authentication_endpoint: "http://localhost"' >> /etc/cobbler/settings.d/zz-uyuni.settings
1716else
1817 sed 's/uyuni_authentication_endpoint.*/uyuni_authentication_endpoint: http:\/\/localhost/' \
1918 -i /etc/cobbler/settings.d/zz-uyuni.settings;
2019fi
2120
22- grep pam_auth_service /etc/rhn/rhn.conf
23- if [ $? -eq 1 ]; then
21+ if grep -q pam_auth_service /etc/rhn/rhn.conf; then
2422 echo 'pam_auth_service = susemanager' >> /etc/rhn/rhn.conf
2523else
2624 sed 's/pam_auth_service.*/pam_auth_service = susemanager/' -i /etc/rhn/rhn.conf;
You can’t perform that action at this time.
0 commit comments