add: selinux installed check

pull/75/head
kvaps 8 years ago
parent 3c9f1a23ae
commit d38f035f22

@ -32,7 +32,7 @@ then
fi
if [ -f /etc/init.d/one-context ]; then
if [ -d /etc/sysconfig/network-scripts ]; then
if [ -d /etc/sysconfig/network-scripts ] || [ -d /etc/sysconfig/network ]; then
chkconfig --add one-context-local
chkconfig --add one-context
elif [ -d /etc/network ]; then
@ -79,3 +79,12 @@ if [ -d /etc/sysconfig/network-scripts ]; then
rm -f /etc/sysconfig/network-scripts/ifcfg-eth*
fi
# openSUSE based distros
if [ -d /etc/sysconfig/network ]; then
# Prepare network files
rm -f /etc/sysconfig/network/ifcfg-eth*
rm -f /etc/sysconfig/network/routes
sed -i '/^NETCONFIG_DNS_STATIC_SERVERS=/ s/=.*$/=""/' /etc/sysconfig/network/config
sed -i '/^NETCONFIG_DNS_STATIC_SEARCHLIST=/ s/=.*$/=""/' /etc/sysconfig/network/config
fi

@ -1 +1 @@
restorecon -R -v /root/.ssh
[ -x /sbin/restorecon ] && restorecon -R -v /root/.ssh

Loading…
Cancel
Save