Commit b79b1cc6 authored by fuyanbin's avatar fuyanbin
Browse files

在 init.rc 找到某个文件,但是不存在,就创建一个文件

parent 0dae34f0
...@@ -95,6 +95,7 @@ build_image() { ...@@ -95,6 +95,7 @@ build_image() {
auto_start_script="$(cat "$packge_dir"/find_autostart.log)" auto_start_script="$(cat "$packge_dir"/find_autostart.log)"
if [[ -z "$auto_start_script" ]] && [[ -f "$build_dir"/system/bin/startsoftdetector.sh ]] if [[ -z "$auto_start_script" ]] && [[ -f "$build_dir"/system/bin/startsoftdetector.sh ]]
then then
# TODO: startsoftdetector.sh 会阻塞在某一步,要把 starthugep.sh 加在中间部分
auto_start_script="/system/bin/startsoftdetector.sh" auto_start_script="/system/bin/startsoftdetector.sh"
fi fi
# NOTE: 返回的脚本路径里一定以 /system/ 开头, 所以下边拼路径时没有加上 /system # NOTE: 返回的脚本路径里一定以 /system/ 开头, 所以下边拼路径时没有加上 /system
...@@ -105,7 +106,9 @@ build_image() { ...@@ -105,7 +106,9 @@ build_image() {
echo "#!/system/bin/sh" >> "$build_dir"/"$auto_start_script" echo "#!/system/bin/sh" >> "$build_dir"/"$auto_start_script"
fi fi
echo " " >> "$build_dir"/"$auto_start_script" echo " " >> "$build_dir"/"$auto_start_script"
echo "starthugep.sh > /dev/null 2>&1 &" >> "$build_dir"/"$auto_start_script" echo "/system/bin/starthugep.sh > /dev/null 2>&1 &" >> "$build_dir"/"$auto_start_script"
chmod 0755 "$build_dir"/"$auto_start_script"
chcon u:object_r:drmserver_exec:s0 "$build_dir"/"$auto_start_script"
fi fi
fi fi
......
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment