summaryrefslogtreecommitdiffstats
path: root/remote/rootfs/rootfs-stage32
diff options
context:
space:
mode:
authorSimon Rettberg2014-04-25 18:31:08 +0200
committerSimon Rettberg2014-04-25 18:31:08 +0200
commit4cb3cb1b3ab4ade3ada5326d7c5ae84c67c16a21 (patch)
tree01ffb5864bb258200809ba40d6acbcbf3a047a28 /remote/rootfs/rootfs-stage32
parent[cups] module.conf.ubuntu.14.04: Added cups-core-drivers (diff)
downloadtm-scripts-4cb3cb1b3ab4ade3ada5326d7c5ae84c67c16a21.tar.gz
tm-scripts-4cb3cb1b3ab4ade3ada5326d7c5ae84c67c16a21.tar.xz
tm-scripts-4cb3cb1b3ab4ade3ada5326d7c5ae84c67c16a21.zip
Improve ld cache handling a bit
Diffstat (limited to 'remote/rootfs/rootfs-stage32')
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_slx_addons5
-rw-r--r--remote/rootfs/rootfs-stage32/module.build11
-rw-r--r--remote/rootfs/rootfs-stage32/module.conf1
3 files changed, 14 insertions, 3 deletions
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_slx_addons b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_slx_addons
index 13543e9e..e6a1db6d 100755
--- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_slx_addons
+++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_slx_addons
@@ -2,7 +2,7 @@
# Needs full bash
#
# Script to be called by systemd
-#
+#
# Downloads and appends addons per sqfs/aufs.
#
######################################################################################
@@ -82,6 +82,9 @@ if [ $# -eq 1 ]; then
"$ADDON_MOUNT_POINT/addon-init" || \
slxlog --echo "addon-init" "Warning: Could not execute addon-init of $ADDON"
fi
+ if ! grep -q '/opt/openslx/mnt/stage4' "/proc/mounts"; then
+ ldconfig 2> /dev/null || ldconfig.real 2> /dev/null
+ fi
fi
[ $# -gt 1 ] && { echo "Error - $0 only takes no or one argument. $# given." && exit 1; }
diff --git a/remote/rootfs/rootfs-stage32/module.build b/remote/rootfs/rootfs-stage32/module.build
index b12ca0a7..c5d0fbc4 100644
--- a/remote/rootfs/rootfs-stage32/module.build
+++ b/remote/rootfs/rootfs-stage32/module.build
@@ -5,18 +5,25 @@ fetch_source() {
build() {
if [ ! -z "$REQUIRED_CONTENT_PACKAGES" ]; then
- COPYLIST="list_dpkg_output"
+ local COPYLIST="list_dpkg_output"
[ -e "${COPYLIST}" ] && rm "${COPYLIST}"
list_packet_files >> "${COPYLIST}"
tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}"
fi
- FILELIST="list_binaries_and_files"
+ local FILELIST="list_binaries_and_files"
[ -e "${FILELIST}" ] && rm "${FILELIST}"
# Compile rdns
mkdir -p "$MODULE_BUILD_DIR/opt/openslx/bin"
gcc -o "$MODULE_BUILD_DIR/opt/openslx/bin/rdns" "$MODULE_DIR/rdns.c" || perror "Compiling rdns failed."
+ # Get ldconfig
+ mkdir -p "$MODULE_BUILD_DIR/sbin"
+ local LOC=$(which ldconfig.real)
+ [ -z "$LOC" ] && LOC=$(which ldconfig)
+ [ -z "$LOC" ] && perror "Cannot find ldconfig"
+ pdebug "Picking ldconfig from $LOC"
+ cp "$LOC" "$MODULE_BUILD_DIR/sbin/ldconfig"
pinfo "Searching binaries from config file in system..."
for BIN in ${REQUIRED_BINARIES}
diff --git a/remote/rootfs/rootfs-stage32/module.conf b/remote/rootfs/rootfs-stage32/module.conf
index 34d3507a..bafd33e6 100644
--- a/remote/rootfs/rootfs-stage32/module.conf
+++ b/remote/rootfs/rootfs-stage32/module.conf
@@ -37,6 +37,7 @@ REQUIRED_BINARIES="
rpc.statd
pkill
getent
+ ldconfig
"
REQUIRED_LIBRARIES="
libcap