Bugfix: Support command delivery to syscall
This work is for bug fixing TDIS-2302: "Reboot download" can't reload to
download mode.
Previous sysvinit supports special command passing mechanism when
calling reboot, shutdown, halt. For example, when executing 'reboot
download', the 'download' command is delivered to reboot syscall so
system automatically enter the download mode after rebooting without any
hand action. (Press 'power' and 'volume down' button simultaneously)
However in systemd, when executing 'reboot/halt/shutdown', only realtime
signal is passed through '/dev/initctl'. So systemd daemon can't get the
command to execute.
In order to solve this issue, the command to be delivered is temporally
written to tmp file and shutdown service of systemd will read the
command if existing.
Change-Id: Ic5a07bfa144962f39276c36c33405931d4e592be
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>