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

Last change on this file since 5919 was 5919, checked in by skylar, 4 years ago

quote variable re #993

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 844 bytes
Line 
1#!/bin/bash
2
3# $Id: bccd_deb_after_install 5919 2017-03-11 20:28:59Z 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)
18useradd -k /etc/bccd-skel -m bccd
19# Set bccd-stage to LIVE if we are running in Jenkins or a live boot (aufs mount detected)
20if [[ "x${WORKSPACE}" != "x" ]] || mount|grep -q aufs > /dev/null 2>&1 ; then
21    echo LIVE > /etc/bccd-stage
22else
23    echo LIBERATED > /etc/bccd-stage
24fi
25
26# Add snmp user (#991)
27useradd -r snmp
28
29# Enable systemd units
30for unit in {bccd-passwd,openssh-gen-host-keys}.service; do
31    systemctl enable /etc/systemd/system/"${unit}"
32done
33
34# Ensure consistent NIC names (#991)
35ln -s /dev/null /etc/systemd/network/99-default.link
Note: See TracBrowser for help on using the repository browser.