diff options
author | Leonard Kugis <leonard@kug.is> | 2025-09-15 15:53:03 +0000 |
---|---|---|
committer | Leonard Kugis <leonard@kug.is> | 2025-09-15 15:53:03 +0000 |
commit | 7cb13b3ef23299e2b0639a6694a75a23bafa5f4a (patch) | |
tree | dbe349157443d2e6dbe69ae84b24169473fa4e10 /mount-from-config.sh | |
parent | c9a8550a26f81ce131bc1620a8ee2f893825ee90 (diff) | |
download | multi-mount-7cb13b3ef23299e2b0639a6694a75a23bafa5f4a.tar.gz |
Forked, added SU_OPTIONS
su_options are now configurable for each mount.
They will be applied in 'su ${SU_OPTIONS} -c "<mount command>"'.
This way, special options like '--master-mount' can be injected.
Diffstat (limited to 'mount-from-config.sh')
-rw-r--r-- | mount-from-config.sh | 4 |
1 files changed, 2 insertions, 2 deletions
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 |