the problem seems to be as follows: after your corrections the script finally works. Before, it always yielded an exit code != 0, because of the syntax errors.
Now, I tracked down the problem by printing more logs. It turns out, that
hal-system-smbios --st_wlan
always yields "1" as the result, regardless of the position of the rfkill switch. Thus, the script always exits with 0, which apparently is wrong.
Hello Martin,
the problem seems to be as follows: after your corrections the script finally works. Before, it always yielded an exit code != 0, because of the syntax errors.
Now, I tracked down the problem by printing more logs. It turns out, that
hal-system-smbios --st_wlan
always yields "1" as the result, regardless of the position of the rfkill switch. Thus, the script always exits with 0, which apparently is wrong.