]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
Added and used files/nsswitch.conf in create-grml-squash.sh, replaced getting PB...
authorFrank Brehm <frank.brehm@profitbricks.com>
Wed, 8 Oct 2014 14:27:37 +0000 (16:27 +0200)
committerFrank Brehm <frank.brehm@profitbricks.com>
Wed, 8 Oct 2014 14:27:37 +0000 (16:27 +0200)
create-grml-squash.sh
files/nsswitch.conf [new file with mode: 0644]

index ebdb2908483f160bc6468fa129f80f21b2f62cbc..97300260fa2089ed91acf5ebab2446e17896c61e 100755 (executable)
@@ -313,6 +313,11 @@ mounting_dirs() {
     info "Mounting ${TARGET_DIR}/run/lock ..."
     mount -t tmpfs -o size=3% tmpfs ${TARGET_DIR}/run/lock
 
+    if [[ ! -d "${TARGET_DIR}/run/lock" ]] ; then
+        info "Creating ${TARGET_DIR}/run/lock ..."
+        MKDIR "${TARGET_DIR}/run/lock"
+    fi
+
 }
 
 #------------------------------------------------------------------------------
@@ -343,26 +348,22 @@ add_pb_repo() {
 
     echo
     info "Adding Profitbricks Debian repository."
-    CHROOT apt-key adv --fetch-keys http://alexandria.pb.local/profitbricks-repository/0CC30F89AD6863A7.asc
 
     cat >${TARGET_DIR}/etc/apt/sources.list.d/profitbricks.list <<EOF
 # ProfitBricks Debian repositories
-
-deb            http://repo01.pb.local/pb-debian        wheezy                  main non-free contrib
-deb            http://repo01.pb.local/pb-debian        wheezy-proposed main non-free contrib
-
+deb http://repo.pb.local/pb-debian wheezy main non-free contrib
 EOF
 
+    export DEBIAN_FRONTEND="noninteractive"
+    CHROOT apt-get update --allow-unauthenticated
+    CHROOT apt-get install --allow-unauthenticated --yes profitbricks-keyring
+
 }
 
 #------------------------------------------------------------------------------
 update_packages() {
     echo
     info "Updating all packages."
-    if [[ ! -d "${TARGET_DIR}/run/lock" ]] ; then
-        info "Creating ${TARGET_DIR}/run/lock ..."
-        MKDIR "${TARGET_DIR}/run/lock"
-    fi
     export DEBIAN_FRONTEND="noninteractive"
     CHROOT apt-get update || true
     CHROOT aptitude full-upgrade -y || true
@@ -417,7 +418,7 @@ copy_files() {
     CP -p files/authorized_keys ${TARGET_DIR}/root/.ssh/
     CHOWN root:root ${TARGET_DIR}/root/.ssh/authorized_keys
 
-    for f in files/inputrc files/modules files/rc.local ; do
+    for f in files/inputrc files/modules files/rc.local files/nsswitch.conf ; do
         b=$(basename ${f})
         CP -p ${f} ${TARGET_DIR}/etc/${b}
         CHOWN root:root ${TARGET_DIR}/etc/${b}
@@ -435,6 +436,9 @@ copy_files() {
     info "Enabling ${GREEN}rc.local${NORMAL} in runlevel ..."
     CHROOT update-rc.d rc.local defaults
 
+    info "Disabling ${YELLOW}avahi-daemon${NORMAL} in all runlevels ..."
+    CHROOT update-rc.d avahi-daemon remove || true
+
 }
 
 #------------------------------------------------------------------------------
diff --git a/files/nsswitch.conf b/files/nsswitch.conf
new file mode 100644 (file)
index 0000000..7036b90
--- /dev/null
@@ -0,0 +1,19 @@
+# /etc/nsswitch.conf
+#
+# Example configuration of GNU Name Service Switch functionality.
+# If you have the `glibc-doc-reference' and `info' packages installed, try:
+# `info libc "Name Service Switch"' for information about this file.
+
+passwd:         compat
+group:          compat
+shadow:         compat
+
+hosts:          files myhostname dns
+networks:       files
+
+protocols:      db files
+services:       db files
+ethers:         db files
+rpc:            db files
+
+netgroup:       nis