xref: /OK3568_Linux_fs/device/rockchip/common/post-hooks/06-async-commit.sh
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash -e
2
3POST_ROOTFS_ONLY=1
4
5source "${POST_HELPER:-$(dirname "$(realpath "$0")")/../post-hooks/post-helper}"
6
7echo "Installing async-commit service..."
8
9rm -f etc/init.d/S*async_commit.sh \
10	etc/systemd/system/multi-user.target.wants/async.service \
11	usr/lib/systemd/system/async.service
12
13cd "$SDK_DIR"
14
15mkdir -p "$TARGET_DIR/usr/bin"
16install -m 0755 external/rkscript/async-commit "$TARGET_DIR/usr/bin/"
17
18find "$TARGET_DIR" -name modetest -print0 | xargs -0 rm -f
19install -m 0755 "$RK_TOOL_DIR/armhf/modetest" "$TARGET_DIR/usr/bin/modetest"
20
21if [ "$POST_INIT_SYSTEMD" ]; then
22	install -m 0755 external/rkscript/async-commit.service \
23		"$TARGET_DIR/lib/systemd/system/"
24	mkdir -p "$TARGET_DIR/etc/systemd/system/sysinit.target.wants"
25	ln -sf /lib/systemd/system/async-commit.service \
26		"$TARGET_DIR/etc/systemd/system/sysinit.target.wants/"
27fi
28
29if [ "$POST_INIT_SYSV" ]; then
30	install -m 0755 external/rkscript/S*async-commit.sh \
31		"$TARGET_DIR/etc/init.d/async-commit.sh"
32	ln -sf ../init.d/async-commit.sh \
33		"$TARGET_DIR/etc/rcS.d/S05async-commit.sh"
34fi
35
36if [ "$POST_INIT_BUSYBOX" ]; then
37	install -m 0755 external/rkscript/S*async-commit.sh \
38		"$TARGET_DIR/etc/init.d/"
39fi
40

served by {OpenGrok

Last Index Update: Tue Dec 02 07:10:48 UTC 2025