Prevent hostapd and wpa_supplicant from running

Wi-Fi is disabled on my router with OpenWrt-22.03. How could I prevent hostapd and wpa_supplicant from running please? I don't need these 2 processes.
TIA for any hints, Peter

Disable the wpad service.

I would like the service disabled immediately after a sysupgrade, i.e. without executing commands after the flashing.
Now I create a file files/etc/init.d/wpad like this:

#!/bin/sh /etc/rc.common



start_service() {
    return 0

before compiling the new image.

This seems to work. Do you know a cleaner way to do that, perhaps a configuration option in make menuconfig?

If the status of the service is preserved cross upgrade, disable the service pre flash, manually, or in the upgrade script..?

Modifying the TRX-file before flashing is bit too complicated for me.
And in the upgrade script, that last command will always be sysupgrade.
I think, that's ok for me to create such special wpad file.

indeed, but it's a script, you could easily add service wpad disable to it.

It's seems a bit too complicated for me. At what line? At the end?
And when I do git pull, there could be merge conflicts...

just skimmed through the script, but I'd try putting it before install_bin /sbin/upgraded,
which is approx 20 lines from the bottom.

if the radio going up, and then going down again would be an option, you could do a
service wpad stop in the start up script.

Remove wpad-[xxx] from the build if you don't need it.....

Yes, I'm thinking about this. Until now (and since several years), I used the same git-checkout and the same .config for all my devices (some with Wi-Fi, some without). Only the files in the files-directory are different. But perhaps I'll consider using a different .config for each device.

Here is my update-script, in case you are interested:

cd ~/soft/wl-500gp || exit 1
if [ "$1" = up ]; then
    git pull && ./scripts/feeds update -a && ./scripts/feeds install -a
    exit 0
elif [ "$1" = clean ]; then
    make clean
    exit 0
elif [ "$1" = distclean ]; then
    ./scripts/feeds clean
    mv .config local/config-save
    make distclean
    mv local/config-save .config
    exit 0
elif [ -z "$1" ] || ! [ -d local/$1 ]; then
    echo first argument must be sub-directory of local/
    exit 1
case $1 in
# ......
make menuconfig && make download && ln -sfT local/$1 files &&                \
    find local -name "*~" -delete && make -j10 &&                            \
    scp -P$SSH_PORT $TRX root@$HOST:/tmp &&                                  \
    (ssh -oServerAliveInterval=60 -p$SSH_PORT root@$HOST                     \
         sysupgrade -n -v /tmp/$TRX_F & sleep 150)
ls -l $TRX
./scripts/ >local/`date +diff-%Y-%m-%d-%H-%M.txt`
beep 30

I use imagebuilder to produce images. It takes ~30 seconds on a cheap laptop. I have a makeimage script and it is very simple to remove/add packages from/to the PACKAGES list.

As imagebuilder is so fast to create an image, doing rapid iteration on removing packages and files is very easy and every package you can leave out gives you a bit more free space - every byte matters for an asus_wl-500gp, as I am sure you know, as you only have 8MB to play with......
If you are not aware, deleting a package from a running image actually uses more space.
Likewise, adding a package to a running image takes more storage than it does if you build the image with the package, because it gets compressed in the image build.

Building the image without packages you do not need and with packages you do, is a win/win.