How to overwrite hostname and banner with uci-defaults

I have two uci-defaults scripts, but it doesn't work

#!/bin/sh
[ "$(uci -q get system.@system[0].hostname)" = "FoxHole" ] && exit 0

uci -q batch << EOF
	set system.@system[0].hostname="FoxHole"
	commit system
EOF

exit 0
#!/bin/sh
if grep -q "Freedom for foxes!" /etc/banner; then
    exit 0
fi

echo "" > /etc/banner

cat << EOF > /etc/banner
    ▄████████  ▄██████▄  ▀████    ▐████▀    ▄█    █▄     ▄██████▄   ▄█          ▄████████
   ███    ███ ███    ███   ███▌   ████▀    ███    ███   ███    ███ ███         ███    ███
   ███    █▀  ███    ███    ███  ▐███      ███    ███   ███    ███ ███         ███    █▀
  ▄███▄▄▄     ███    ███    ▀███▄███▀     ▄███▄▄▄▄███▄▄ ███    ███ ███        ▄███▄▄▄
 ▀▀███▀▀▀     ███    ███    ████▀██▄     ▀▀███▀▀▀▀███▀  ███    ███ ███       ▀▀███▀▀▀
   ███        ███    ███   ▐███  ▀███      ███    ███   ███    ███ ███         ███    █▄
   ███        ███    ███  ▄███     ███▄    ███    ███   ███    ███ ███▌    ▄   ███    ███
   ███         ▀██████▀  ████       ███▄   ███    █▀     ▀██████▀  █████▄▄██   ██████████
                                                                   ▀

   Freedom for foxes!
 ---------------------------------------------------------------------------------------
 %D %V, %C
 ---------------------------------------------------------------------------------------
EOF

exit 0

Why?

Where are you putting them, and what names do you give them?

What’s your test method?

Im putting it in {buildroot}/files/etc/efci-defaults/
Names 30-change_hostname and 31-change_banner

Testing it by rebuild and reflash sd card

Typo?

Which device? RPi, for example, sometimes do not erase old config when reflashing.

Yes, I was wrong, I meant uci-defaults

Orange Pi R1 Plus LTS

If you reset to factory defaults, then reboot, does you script work?

No
It deletes after first boot

That implies it has run successfully. Hmm…