mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
Disable networking on image with command line option ./build -p -n
This commit is contained in:
@@ -1,2 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
#rm "${1}/etc/init.d/"S*network
|
||||
# This is run as part of:
|
||||
# make target-finalize
|
||||
# which gets called by the default target.
|
||||
# To test it out, arguments can be passed with:
|
||||
# make BR2_ROOTFS_POST_SCRIPT_ARGS="asdf qwer"
|
||||
target_dir="$1"
|
||||
shift
|
||||
net=true
|
||||
while getopts 'n' OPT; do
|
||||
case "$OPT" in
|
||||
n)
|
||||
echo asdfqwer
|
||||
net=false
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $(($OPTIND - 1))
|
||||
if ! "$net"; then
|
||||
rm -f "${target_dir}/etc/init.d/"S*network
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user