mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-31 21:13:00 +02:00
The Classic builds served for a while as an introduction to classic embedded systems, with a user managed read-writable /etc. Today we decided to firmly take the plunge into the future with NETCONF and focus on our core platforms aarch64 and x86_64 (for Qemu). The reasons are several: reduce overhead, simplify build and release work, as well as manual testing, since Classic builds do not have any automated regression testing. The Classic builds may be resurrected later in a dedicated project. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
54 lines
865 B
Bash
Executable File
54 lines
865 B
Bash
Executable File
#!/bin/sh
|
|
|
|
SCRIPT_PATH="$(dirname "$(readlink -f "$0")")"
|
|
CONFIGS="$SCRIPT_PATH/../../../configs"
|
|
|
|
whitelist()
|
|
{
|
|
nm=$(basename "$1")
|
|
case $nm in
|
|
cn9130_crb_boot_defconfig | fireant_boot_defconfig)
|
|
return 0
|
|
;;
|
|
*)
|
|
return 1
|
|
;;
|
|
esac
|
|
}
|
|
|
|
# Check for disabled root login
|
|
disabled_root_login()
|
|
{
|
|
txt="# BR2_TARGET_ENABLE_ROOT_LOGIN is not set"
|
|
fn=$(realpath "$1")
|
|
|
|
if ! grep -q "$txt" "$fn"; then
|
|
if ! whitelist "$fn"; then
|
|
echo "Missing '$txt' in $fn!"
|
|
return 1
|
|
fi
|
|
fi
|
|
}
|
|
|
|
# For all defconfigs
|
|
check()
|
|
{
|
|
total=$#
|
|
num=1
|
|
|
|
echo "1..$total"
|
|
for defconfig in "$@"; do
|
|
fn=$(basename "$defconfig")
|
|
if disabled_root_login "$defconfig"; then
|
|
echo "ok $num - $fn"
|
|
else
|
|
echo "not ok $num - $fn has not disabled root login"
|
|
fi
|
|
num=$((num + 1))
|
|
done
|
|
}
|
|
|
|
check "$CONFIGS"/* || exit 1
|
|
|
|
exit 0
|