]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
Chowning some files to root:root and changed PB repositories to repo01.pb.local in...
authorFrank Brehm <frank.brehm@profitbricks.com>
Wed, 10 Sep 2014 09:43:23 +0000 (11:43 +0200)
committerFrank Brehm <frank.brehm@profitbricks.com>
Wed, 10 Sep 2014 09:43:23 +0000 (11:43 +0200)
create-grml-squash.sh

index 6eb8d12377cfa4a43e1ac0266c873e469d7ccfa8..ebdb2908483f160bc6468fa129f80f21b2f62cbc 100755 (executable)
@@ -126,6 +126,14 @@ CHMOD() {
     fi
 }
 
+CHOWN() {
+    if [ "${verbose}" = "y" ] ; then
+        chown -v "$@"
+    else
+        chown "$@"
+    fi
+}
+
 MKDIR() {
     if [ "${verbose}" = "y" ] ; then
         mkdir -v "$@"
@@ -340,10 +348,8 @@ add_pb_repo() {
     cat >${TARGET_DIR}/etc/apt/sources.list.d/profitbricks.list <<EOF
 # ProfitBricks Debian repositories
 
-deb     http://alexandria.pb.local/pb-wheezy production                     main non-free contrib
-deb-src http://alexandria.pb.local/pb-wheezy production                     main non-free contrib
-deb     http://alexandria.pb.local/pb-wheezy production-approved-updates    main non-free contrib
-deb-src http://alexandria.pb.local/pb-wheezy production-approved-updates    main non-free contrib
+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
 
 EOF
 
@@ -409,16 +415,22 @@ copy_files() {
     fi
     CHMOD 0700 ${TARGET_DIR}/root/.ssh
     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
-        CP -p ${f} ${TARGET_DIR}/etc
+        b=$(basename ${f})
+        CP -p ${f} ${TARGET_DIR}/etc/${b}
+        CHOWN root:root ${TARGET_DIR}/etc/${b}
     done
 
     for f in files/zlogout files/zshrc ; do
-        CP -p ${f} ${TARGET_DIR}/etc/zsh
+        b=$(basename ${f})
+        CP -p ${f} ${TARGET_DIR}/etc/zsh/${b}
+        CHOWN root:root ${TARGET_DIR}/etc/zsh/${b}
     done
 
     CP -p files/vimrc.local ${TARGET_DIR}/etc/vim/
+    CHOWN root:root ${TARGET_DIR}/etc/vim/vimrc.local
 
     info "Enabling ${GREEN}rc.local${NORMAL} in runlevel ..."
     CHROOT update-rc.d rc.local defaults