mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8607 d57e44dd-8a1f-0410-8b47-8ef2f437770f
19 lines
573 B
Bash
Executable File
19 lines
573 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Parse modules.order and sign the modules found in that file.
|
|
|
|
if [ -z "$KDIR" ]; then
|
|
echo "Error: \$KDIR has not been set"
|
|
exit 1
|
|
fi
|
|
|
|
scst_dir=$(dirname "$(cd "$(dirname "$0")" && pwd)")
|
|
|
|
CONFIG_MODULE_SIG_HASH=$(sed -n 's/^CONFIG_MODULE_SIG_HASH="\([^"]*\)"$/\1/p' "${KDIR}/.config")
|
|
|
|
sed 's,^kernel/,,' < modules.order | \
|
|
while read -r f; do
|
|
echo "Signing $f"
|
|
"${KDIR}/scripts/sign-file" "${CONFIG_MODULE_SIG_HASH}" "${scst_dir}/scst/src/certs/scst_module_key.priv" "${scst_dir}/scst/src/certs/scst_module_key.der" "$f" || exit $?
|
|
done
|