extract checking of sudo to separate function, use su -c instead on pclinuxos, update #2808