update loging level of snmpd and misc cleanup 13/2013/1
authordavidplunkett <dp7642@att.com>
Wed, 20 Nov 2019 07:21:29 +0000 (07:21 +0000)
committerdavidplunkett <dp7642@att.com>
Wed, 20 Nov 2019 07:21:29 +0000 (07:21 +0000)
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 <dp7642@att.com>
Change-Id: I274f2de143e83f7f59fe6b91214a5aafabc9f3ed

firstboot-airship-iab.sh.template
firstboot-genesis.sh.template
firstboot.sh.template

index 5002318..52a4aaa 100644 (file)
 # 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
 
index 36a6750..18d257c 100644 (file)
@@ -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'=')
index 0e48f4f..aff5793 100644 (file)
 # 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