rootfs-builder: Don't modify /sbin/init on the build host

Don't modify /sbin/init on the build host when using command `AGENT_INIT="yes" ./rootfs.sh centos` to build rootfs.

Fixes: #430

Signed-off-by: liangxianlong <liang.xianlong@zte.com.cn>
This commit is contained in:
liangxianlong 2020-07-18 14:19:06 +08:00
parent c5c3f5c31d
commit 7bbb9e8122

View File

@ -660,7 +660,6 @@ main()
{ {
parse_arguments $* parse_arguments $*
check_env_variables check_env_variables
init="${ROOTFS_DIR}/sbin/init"
if [ -n "$distro" ]; then if [ -n "$distro" ]; then
build_rootfs_distro build_rootfs_distro
@ -673,6 +672,7 @@ main()
prepare_overlay prepare_overlay
fi fi
init="${ROOTFS_DIR}/sbin/init"
setup_rootfs setup_rootfs
} }