From 7cb13b3ef23299e2b0639a6694a75a23bafa5f4a Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Mon, 15 Sep 2025 15:53:03 +0000 Subject: Forked, added SU_OPTIONS su_options are now configurable for each mount. They will be applied in 'su ${SU_OPTIONS} -c ""'. This way, special options like '--master-mount' can be injected. --- mount-from-config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mount-from-config.sh') diff --git a/mount-from-config.sh b/mount-from-config.sh index fc9a2c4..ce4c17f 100644 --- a/mount-from-config.sh +++ b/mount-from-config.sh @@ -1,6 +1,6 @@ #!/system/bin/sh CONFIG_FILE="$1" -CONFIG_PARAMS="mount_options mount_source mount_target mount_max_retries mount_retry_interval" +CONFIG_PARAMS="su_options mount_options mount_source mount_target mount_max_retries mount_retry_interval" # source user-specified config file if [ -r "${CONFIG_FILE}" ]; then @@ -24,7 +24,7 @@ fi mkdir -p "${mount_target}" >> "${LOG_FILE}" 2>&1 retries=0 while : ; do - su -c "mount ${mount_options} \"${mount_source}\" \"${mount_target}\"" >> "${LOG_FILE}" 2>&1 + su ${su_options} -c "mount ${mount_options} \"${mount_source}\" \"${mount_target}\"" >> "${LOG_FILE}" 2>&1 if grep -q "${mount_target}" /proc/mounts; then echo "Successfully mounted source \"${mount_source}\" at \"${mount_target}\"." >> "${LOG_FILE}" 2>&1 break -- cgit v1.2.3