source: /cluster/svnroot/bccd-ng/branches/skylar/bccd-3.4.0-build_ng/bin/deb/bccd_deb_after_install @ 6053

Last change on this file since 6053 was 6053, checked in by skylar, 2 years ago

only create accounts if they do not already exist re #1008

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 802 bytes
Line 
1#!/bin/bash
2
3# $Id: bccd_deb_after_install 6053 2018-07-13 03:51:34Z skylar $
4
5set -eo pipefail
6
7PATH=/bin:/usr/bin:/sbin:/usr/sbin
8
9# Install BCCD apt keys (#979)
10for k in /etc/bccd/keys/*; do
11    apt-key add "${k}"
12done
13
14# Set root password to "letmein" (#966)
15echo 'root:letmein'|chpasswd
16
17# Add bccd user using bccd user skeleton directory (#988)
18if ! getent passwd bccd > /dev/null; then
19    useradd -k /etc/bccd-skel -m bccd
20fi
21# Set bccd-stage to LIVE if we are running in Jenkins or a live boot (aufs mount detected)
22if [[ "x${WORKSPACE}" != "x" ]] || mount|grep -q aufs > /dev/null 2>&1 ; then
23    echo LIVE > /etc/bccd-stage
24else
25    echo LIBERATED > /etc/bccd-stage
26fi
27
28# Add snmp user (#991)
29if ! getent passwd snmp > /dev/null; then
30    useradd -r snmp
31fi
32
33# Ensure consistent NIC names (#991)
34ln -s /dev/null /etc/systemd/network/99-default.link
Note: See TracBrowser for help on using the repository browser.