init: optimized wake-on-lan script
Merge pull request #3153 from andreasmn/wakeonlan

init: optimized wake-on-lan script