diff --git a/postinstall.one b/postinstall.one index 7f9fe42..d8a03c5 100755 --- a/postinstall.one +++ b/postinstall.one @@ -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 + diff --git a/src/etc/one-context.d/loc-23-selinux-ssh##rpm b/src/etc/one-context.d/loc-23-selinux-ssh##rpm index 164d1c1..bfc513d 100755 --- a/src/etc/one-context.d/loc-23-selinux-ssh##rpm +++ b/src/etc/one-context.d/loc-23-selinux-ssh##rpm @@ -1 +1 @@ -restorecon -R -v /root/.ssh +[ -x /sbin/restorecon ] && restorecon -R -v /root/.ssh