From d7a556a73a638b60138265821d4be38f7f3a2f06 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 7 Feb 2023 14:16:40 +0100 Subject: [bwlp-stage4-tweaks] Add script to read a file into fscache Also tries to run ldd on the file and load all the dependencies --- .../bwlp-stage4-tweaks/data/opt/openslx/bin/loadfscache | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 core/modules/bwlp-stage4-tweaks/data/opt/openslx/bin/loadfscache (limited to 'core/modules/bwlp-stage4-tweaks') diff --git a/core/modules/bwlp-stage4-tweaks/data/opt/openslx/bin/loadfscache b/core/modules/bwlp-stage4-tweaks/data/opt/openslx/bin/loadfscache new file mode 100755 index 00000000..c2f1f0c9 --- /dev/null +++ b/core/modules/bwlp-stage4-tweaks/data/opt/openslx/bin/loadfscache @@ -0,0 +1,16 @@ +#!/bin/ash + +if ! [ -e "$1" ]; then + echo "Invalid file $1" + exit 1 +fi + +file="$1" + +cat "$file" &> /dev/null + +for i in $( ldd "$file" | awk '$2 == "=>" {print $3}' ); do + cat "$i" &> /dev/null +done + +exit 0 -- cgit v1.2.3-55-g7522