diff options
author | Simon Rettberg | 2023-02-07 14:16:40 +0100 |
---|---|---|
committer | Simon Rettberg | 2023-02-07 14:16:40 +0100 |
commit | d7a556a73a638b60138265821d4be38f7f3a2f06 (patch) | |
tree | cecaed23d22b760edab9aa0e40581904b1989f69 /core/modules/bwlp-stage4-tweaks | |
parent | [bwlp-stage4-tweaks] Add pswap util (diff) | |
download | mltk-d7a556a73a638b60138265821d4be38f7f3a2f06.tar.gz mltk-d7a556a73a638b60138265821d4be38f7f3a2f06.tar.xz mltk-d7a556a73a638b60138265821d4be38f7f3a2f06.zip |
[bwlp-stage4-tweaks] Add script to read a file into fscache
Also tries to run ldd on the file and load all the dependencies
Diffstat (limited to 'core/modules/bwlp-stage4-tweaks')
-rwxr-xr-x | core/modules/bwlp-stage4-tweaks/data/opt/openslx/bin/loadfscache | 16 |
1 files changed, 16 insertions, 0 deletions
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 |