1. Report an error in the shell:[!: command not found,如图1
[Caption id=”attachment_4126″ align=”alignnone” width=”1363″]#ATFP_CLOSE_Translate_span# Figure 1[/caption]
2020/5/6 下午2:56:57 PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH=/var/log/pcs
2020/5/6 下午2:56:57 /config/init/console_init.sh: line 40: [!: command not found
2020/5/6 下午2:56:57 running chown -R nginx:nginx /var/log/pcs
2020/5/6 下午2:56:57 /config/init/cronlog.sh: line 4: LOG_NAME: unbound variable
2020/5/6 下午2:56:58 Unlinking stale socket /var/run/supervisor/supervisor.sock
2. Edit /build/c_files/config/init/console_init.sh. at[]Add spaces before and after. as shown in Figure 2
Figure 2
env | grep PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH || export PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH="/var/log/pcs"
if [[ $PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH != "" ]]
then
if [! -d $PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH]
then
mkdir -p $PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH
fi
chown -R nginx:nginx $PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH
echo "running chown -R nginx:nginx $PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH"
else
echo "please set environment variable PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH can not be empty"
fi
env | grep PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH || export PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH="/var/log/pcs"
if [[ $PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH != "" ]]
then
if [ ! -d $PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH ]
then
mkdir -p $PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH
fi
chown -R nginx:nginx $PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH
echo "running chown -R nginx:nginx $PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH"
else
echo "please set environment variable PCS_API_CFG_ACTION_LOG_ABSOLUTE_PATH can not be empty"
fi
3. There is no error in the shell. And the error: unlinking stale socket /var/run/supervisor/supervisor.sock has also disappeared. as shown in Figure 3
Figure 3
Leave a Reply