From 6ae547d78cd332e2448d2450358f0beacc187533 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Fri, 28 Feb 2020 12:45:26 +0200 Subject: [PATCH] [snmp] remove hostname change as it share uts namespace with host Signed-off-by: Stepan Blyschak --- dockers/docker-snmp-sv2/start.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/dockers/docker-snmp-sv2/start.sh b/dockers/docker-snmp-sv2/start.sh index 786968cf9d90..6ec3379df58f 100755 --- a/dockers/docker-snmp-sv2/start.sh +++ b/dockers/docker-snmp-sv2/start.sh @@ -9,17 +9,6 @@ sonic-cfggen -d -y /etc/sonic/snmp.yml -t /usr/share/sonic/templates/snmpd.conf. mkdir -p /var/sonic echo "# Config files managed by sonic-config-engine" > /var/sonic/config_status -CURRENT_HOSTNAME=`hostname` -HOSTNAME=`sonic-cfggen -d -v DEVICE_METADATA[\'localhost\'][\'hostname\']` - -if [ "$?" == "0" ] && [ "$HOSTNAME" != "" ]; then - echo $HOSTNAME > /etc/hostname - hostname -F /etc/hostname - - sed -i "/\s$CURRENT_HOSTNAME$/d" /etc/hosts - echo "127.0.0.1 $HOSTNAME" >> /etc/hosts -fi - rm -f /var/run/rsyslogd.pid supervisorctl start rsyslogd