fi
}
+CHOWN() {
+ if [ "${verbose}" = "y" ] ; then
+ chown -v "$@"
+ else
+ chown "$@"
+ fi
+}
+
MKDIR() {
if [ "${verbose}" = "y" ] ; then
mkdir -v "$@"
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
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