Prevent hostapd and wpa_supplicant from running

Hi,
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.

Thanks!
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=19
STOP=21

USE_PROCD=1
NAME=wpad

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:

#!/bin/bash
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
fi
TRX_F=openwrt-bcm47xx-legacy-asus_wl-500gp-v1-squashfs.trx
TRX_D=bin/targets/bcm47xx/legacy
TRX=$TRX_D/$TRX_F
case $1 in
    gm-b1-1)
        HOST=gm-b1
        SSH_PORT=1234
        ;;
    gm-b1-2)
        HOST=gm-b1
        SSH_PORT=2345
        ;;
    bl-b1)
        HOST=bl-b1
        SSH_PORT=3456
        ;;
# ......
esac
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/diffconfig.sh >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.