Fixing LITE_FOPT_COPYFILE_SYM in copyfile() also changed rsync(), which
has always passed that flag. Every caller would start getting links in
the destination where they used to get a copy of the file.
Keep following links by default and add LITE_FOPT_RSYNC_LINKS for
callers that want them recreated.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The runbg() function is a delayed execvp() that has double-forked to the
background (to not create zombies). It is useful for running commands
in the background for APIs that need to return a reply, e.g. a NETCONF
RPC to reboot the system.
Compared to the original in Infix, this version double forks to reparent
itself to PID 1 (init), closes all open files, including stdio.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>