Exit when common-init.sh finish because reboot is needed.
Add sudo to solve permission problem
Use tee instead of cat to solve permission problem