To fix the shell local issue in the ubus mwan3 rpcd shell script, move the switch case statment into a function. Signed-off-by: Florian Eckert <fe@dev.tdt.de>