I need two specific way to halt my embedded Linux system.
The first halt mode is used to halt the system while maintaining watchdog trigger.
The second halt mode is used to halt the system without maintaining watchdog trigger.
These two behavior are working fine, but actually, I test them only with poweroff (runlevel 0) and by modifing halt script.
I would have an other specific runlevel or parameter to switch these two differents halt modes. Is this possible?
So the system uses sysvinit and runlevel 0 is halt. Runlevel 6 is reboot and runlevel 5 is default (multi user).
The default runlevel 0 is called with poweroff and halt is executed.
But as I need 2 kind of halt scripts, I suppose I have to use an existent unused runlevel like runlevel 4 or
create a new one (even if it seems to be impossible).
At first, I would give a parameter to poweroff to tell it:
enter to runlevel0 but execute halt1 or halt2: like this
But it seems it's not at all possible so I think best idea is to use an other runlevel.
Does someone already heard about this kind of specific needs?
Maybe a better solution exists with Yocto project so I post it here.
Thanks for all, by advance, best reguards