From 372cb6a183ec08857616771574fb8db15af0e9ab Mon Sep 17 00:00:00 2001 From: kvaps Date: Thu, 18 May 2017 02:24:59 +0200 Subject: [PATCH] fix: Changes for this review https://github.com/OpenNebula/addon-context-linux/pull/75#pullrequestreview-37265447 --- postinstall.one | 2 +- src/etc/one-context.d/loc-10-network##rpm.one | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/postinstall.one b/postinstall.one index d8a03c5..00194e7 100755 --- a/postinstall.one +++ b/postinstall.one @@ -83,7 +83,7 @@ fi if [ -d /etc/sysconfig/network ]; then # Prepare network files rm -f /etc/sysconfig/network/ifcfg-eth* - rm -f /etc/sysconfig/network/routes + rm -f /etc/sysconfig/network/ifroute-eth* 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-10-network##rpm.one b/src/etc/one-context.d/loc-10-network##rpm.one index 5043310..6617f00 100755 --- a/src/etc/one-context.d/loc-10-network##rpm.one +++ b/src/etc/one-context.d/loc-10-network##rpm.one @@ -106,7 +106,7 @@ EOT if [ -n "$GATEWAY" ]; then if [ "$CONFIG_PATH" = "/etc/sysconfig/network" ]; then - echo "default $GATEWAY - -" >> /etc/sysconfig/network/routes + echo "default $GATEWAY - $DEV" >> /etc/sysconfig/network/ifroute-$DEV else echo "GATEWAY=$GATEWAY" fi @@ -130,7 +130,7 @@ EOT if [ -n "$GATEWAY6" ]; then if [ "$CONFIG_PATH" = "/etc/sysconfig/network" ]; then - echo "default $GATEWAY6 - -" >> /etc/sysconfig/network/routes + echo "default $GATEWAY6 - $DEV" >> /etc/sysconfig/network/ifroute-$DEV else echo "IPV6_DEFAULTGW=$GATEWAY6" fi @@ -193,18 +193,18 @@ gen_network_configuration() [ -z "${DEV}" ] && continue ( - rm -f /etc/sysconfig/network/routes + rm -f /etc/sysconfig/network/ifroute-$DEV cat <