@@ -3,6 +3,7 @@ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
CONTAINER_PATH="$CCI_SRC/container" +export action=$1
build_depends() { @@ -30,8 +31,10 @@ do_one() ( cd $container [ "$container_name" == 'sub-fluentd' ] && exit
[ -x build ] && ./build
[ -x install ] && ./install
if [ "$action" != "reboot" ]; then
[ -x build ] && ./build
[ -x install ] && ./install
[ -x first-run ] && ./first-run [ -x start ] && ./start )fi
diff --git a/sparrow/7-systemd/cci-network b/sparrow/7-systemd/cci-network index 4aadcdc..dfc69df 100755 --- a/sparrow/7-systemd/cci-network +++ b/sparrow/7-systemd/cci-network @@ -4,13 +4,12 @@ #this file used in our own systemd unit file: cci-network.service. #contents as follows will be automatically executed after system reboot.
-[[ $CCI_SRC ]] || CCI_SRC=/c/compass-ci +# export ENV +. /etc/profile.d/compass.sh
$CCI_SRC/sparrow/2-network/br0 $CCI_SRC/sparrow/2-network/iptables $CCI_SRC/sparrow/2-network/nfs $CCI_SRC/sparrow/2-network/cifs
-# --restart=always option is not absolutely reliable -containers=($(docker ps -a |grep -v NAMES |awk '{print $NF}')) -[ -n "$containers" ] && docker start "${containers[@]}" >/dev/null 2>&1 +$CCI_SRC/sparrow/4-docker/buildall reboot
I think "reboot" here is unsuitable. as a "resume" script, has no input or input is automate is better.
Thanks, dewan
-- 2.23.0