From: davidplunkett Date: Wed, 20 Nov 2019 07:21:29 +0000 (+0000) Subject: update loging level of snmpd and misc cleanup X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=3a8a0d9960753ab91e1daf74a679106e8353c553;p=redfish.git update loging level of snmpd and misc cleanup update logging level of snmpd to address bug: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1246347 remove references to proxy and kubernetes and minor comment updates standardize apt-get update commands Signed-off-by: davidplunkett Change-Id: I274f2de143e83f7f59fe6b91214a5aafabc9f3ed --- diff --git a/firstboot-airship-iab.sh.template b/firstboot-airship-iab.sh.template index 5002318..52a4aaa 100644 --- a/firstboot-airship-iab.sh.template +++ b/firstboot-airship-iab.sh.template @@ -14,11 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Add proxy settings if required for your environment -# -#export http_proxy=http://your.proxy.com:8080/ -#export https_proxy=http://your.proxy.com:8080/ - HOSTNAME=$(hostname -s) echo "### BEGINING FIRSTBOOT SCRIPT ###" "[`date`]" echo " " @@ -26,7 +21,13 @@ echo "### BUILDING SERVER [$HOSTNAME]" echo " " echo "Updating available packages" -apt-get update +apt-get update -q 2>&1 + +echo "Updating snmp logging level" +sed -i "s|-Lsd|-LS6d|" /etc/default/snmpd +sed -i "s|-Lsd|-LS6d|" /etc/init.d/snmpd +systemctl daemon-reload +systemctl restart snmpd exit diff --git a/firstboot-genesis.sh.template b/firstboot-genesis.sh.template index 36a6750..18d257c 100644 --- a/firstboot-genesis.sh.template +++ b/firstboot-genesis.sh.template @@ -21,9 +21,15 @@ echo "### BUILDING SERVER [$HOSTNAME]" echo " " echo "Updating available packages" -apt-get update +apt-get update -q 2>&1 apt-get install -y --install-recommends linux-generic-hwe-16.04 ipmitool +echo "Updating snmp logging level" +sed -i "s|-Lsd|-LS6d|" /etc/default/snmpd +sed -i "s|-Lsd|-LS6d|" /etc/init.d/snmpd +systemctl daemon-reload +systemctl restart snmpd + echo "Checking for hugepages" if grep hugepages /proc/cmdline ; then HUGEPAGESZ=$(grep -oPe '^hugepagesz=[^ ]*| hugepagesz=[^ ]*' /proc/cmdline | cut -f2 -d'=') diff --git a/firstboot.sh.template b/firstboot.sh.template index 0e48f4f..aff5793 100644 --- a/firstboot.sh.template +++ b/firstboot.sh.template @@ -14,11 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Add proxy settings if required for your environment -# -#export http_proxy=http://your.proxy.com:8080/ -#export https_proxy=http://your.proxy.com:8080/ - HOSTNAME=$(hostname -s) echo "### BEGINING FIRSTBOOT SCRIPT ###" "[`date`]" echo " " @@ -26,15 +21,13 @@ echo "### BUILDING SERVER [$HOSTNAME]" echo " " echo "Updating available packages" -apt-get update -apt-get install -y apt-transport-https +apt-get update -q 2>&1 -echo "Adding docker source and key" -curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - -echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" >/etc/apt/sources.list.d/kubernetes.list - -echo "Updating available packages" -apt-get update &>/dev/null +echo "Updating snmp logging level" +sed -i "s|-Lsd|-LS6d|" /etc/default/snmpd +sed -i "s|-Lsd|-LS6d|" /etc/init.d/snmpd +systemctl daemon-reload +systemctl restart snmpd echo "Installing docker" apt-get install -y docker.io aufs-tools 2>&1 @@ -42,7 +35,7 @@ apt-get install -y docker.io aufs-tools 2>&1 echo "Checking that docker is running" docker ps -echo "Installing sshpass, pip, requests, yaml, jinja2 and xorriso" +echo "Installing sshpass, pip, requests, yaml, jinja2, xorriso and isolinux" apt-get install -y sshpass python-pip python-requests python-yaml python-jinja2 xorriso isolinux 2>&1 exit