summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorJonathan Bauer2013-02-08 17:34:49 +0100
committerJonathan Bauer2013-02-08 17:34:49 +0100
commit606e20297bc3ebb6f6432178c42de5ac859d7d10 (patch)
tree9d671e6d22d34759716fd1ea889a5100a25b0a84 /remote
parent[setup_tools] check for locate (diff)
downloadtm-scripts-606e20297bc3ebb6f6432178c42de5ac859d7d10.tar.gz
tm-scripts-606e20297bc3ebb6f6432178c42de5ac859d7d10.tar.xz
tm-scripts-606e20297bc3ebb6f6432178c42de5ac859d7d10.zip
[base] mount.aufs & mount.nfs
Diffstat (limited to 'remote')
-rw-r--r--remote/tools/base/base.build23
-rw-r--r--remote/tools/base/base.conf13
2 files changed, 27 insertions, 9 deletions
diff --git a/remote/tools/base/base.build b/remote/tools/base/base.build
index 91cbfa3f..88d19684 100644
--- a/remote/tools/base/base.build
+++ b/remote/tools/base/base.build
@@ -17,8 +17,16 @@ build() {
for BIN in ${REQUIRED_BINARIES}
do
BIN_LOCATION=$(which ${BIN})
- [ -e ${BIN_LOCATION} ] && echo ${BIN_LOCATION} >> ${FILELIST}
- [ -L ${BIN_LOCATION} ] && echo $(readlink ${BIN_LOCATION}) >> ${FILELIST}
+ if [ ! -z ${BIN_LOCATION} -a -e ${BIN_LOCATION} ];
+ then
+ echo "[$TOOL] Processing $BIN at $BIN_LOCATION ..."
+ echo ${BIN_LOCATION} >> ${FILELIST}
+ [ -L ${BIN_LOCATION} ] \
+ && echo "[$TOOL] ${BIN_LOCATION} is a symbolic link, copying $(readlink -f ${BIN_LOCATION})" \
+ && echo $(readlink -f ${BIN_LOCATION}) >> ${FILELIST}
+ else
+ echo "[$TOOL] ${BIN} not found on the system!"
+ fi
done
for LIB in ${REQUIRED_LIBRARIES}
@@ -38,7 +46,9 @@ build() {
[ ! -d ${FILE} ] && echo ${FILE} >> ${FILELIST}
done
- tar -cpv $(cat ${FILELIST}) | tar -xpv -C ${BUILDDIR} &>/dev/null
+ echo "[$TOOL] File list generated as ${BUILDDIR}/${FILELIST}."
+ echo "--------------------------------------------------------------------"
+ (tar -cpv $(cat ${FILELIST}) | tar -xpv -C ${BUILDDIR}) &>/dev/null
}
post_copy() {
@@ -58,13 +68,13 @@ post_copy() {
cp -r ${TOOL_DIR}/${TOOL}/data/* ${INIT_DIR}
# copy pam modules, TODO: better way to find arch-dependant interfix...
- tar -cpv $(dirname $(locate pam_unix.so|grep ^/lib/)) | tar -xpv -C ${INIT_DIR} &>/dev/null
+ (tar -cpv $(dirname $(locate pam_unix.so|grep ^/lib/)) | tar -xpv -C ${INIT_DIR}) &>/dev/null
# quick fix for /etc/fstab
echo "# no configuration" >> ${INIT_DIR}/etc/fstab
# link /etc/mtab, needed for systemd
- ln -s /proc/self/mounts ${INIT_DIR}/etc/mtab
+ [ ! -e ${INIT_DIR}/etc/mtab ] && ln -s /proc/self/mounts ${INIT_DIR}/etc/mtab
# quick fix for missing group in /etc/group
echo "lock:x:128:" >> ${INIT_DIR}/etc/group
@@ -80,5 +90,6 @@ post_copy() {
#cp -r /lib/modules/$(uname -r) ${INIT_DIR}/lib/modules/$(uname -r)
#quick fix xterm symlink
- ln -s /usr/lib/libXaw7.so.7.0.0 ${INIT_DIR}/usr/lib/libXaw7.so.7
+ [ -e /usr/lib/libXaw7.so.7.0.0 ] && \
+ ln -s /usr/lib/libXaw7.so.7.0.0 ${INIT_DIR}/usr/lib/libXaw7.so.7
}
diff --git a/remote/tools/base/base.conf b/remote/tools/base/base.conf
index 5e97fe51..4322aa73 100644
--- a/remote/tools/base/base.conf
+++ b/remote/tools/base/base.conf
@@ -8,6 +8,9 @@ REQUIRED_BINARIES=" bash
sulogin
mount
umount
+ mount.nfs
+ mount.aufs
+ umount.aufs
rm
ldd
strace
@@ -31,10 +34,13 @@ REQUIRED_LIBRARIES=" libcap
libpam
libutil
libtinfo
- libresolv"
+ libresolv
+ libau"
REQUIRED_DIRECTORIES=" /etc/pam.d
/etc/security"
-REQUIRED_FILES=" /etc/passwd
+REQUIRED_FILES=" /sbin/mount.nfs4
+ /sbin/umount.nfs4
+ /etc/passwd
/etc/shadow
/etc/group
/etc/hostname
@@ -45,4 +51,5 @@ REQUIRED_FILES=" /etc/passwd
/etc/login.defs
/etc/nsswitch.conf
/etc/securetty
- /etc/default/locale"
+ /etc/default/locale
+ /etc/default/aufs"