aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonard Kugis <leonard@kug.is>2025-09-15 15:53:03 +0000
committerLeonard Kugis <leonard@kug.is>2025-09-15 15:53:03 +0000
commit7cb13b3ef23299e2b0639a6694a75a23bafa5f4a (patch)
treedbe349157443d2e6dbe69ae84b24169473fa4e10
parentc9a8550a26f81ce131bc1620a8ee2f893825ee90 (diff)
downloadmulti-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.
-rw-r--r--.gitignore100
-rw-r--r--module.prop4
-rw-r--r--mount-from-config.sh4
3 files changed, 104 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b983ed5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,100 @@
+release
+# Created by https://www.toptal.com/developers/gitignore/api/linux,windows,macos,vim
+# Edit at https://www.toptal.com/developers/gitignore?templates=linux,windows,macos,vim
+
+### Linux ###
+*~
+
+# temporary files which can be created if a process still has a handle open of a deleted file
+.fuse_hidden*
+
+# KDE directory preferences
+.directory
+
+# Linux trash folder which might appear on any partition or disk
+.Trash-*
+
+# .nfs files are created when an open file is removed but is still being accessed
+.nfs*
+
+### macOS ###
+# General
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+### macOS Patch ###
+# iCloud generated files
+*.icloud
+
+### Vim ###
+# Swap
+[._]*.s[a-v][a-z]
+!*.svg # comment out if you don't need vector files
+[._]*.sw[a-p]
+[._]s[a-rt-v][a-z]
+[._]ss[a-gi-z]
+[._]sw[a-p]
+
+# Session
+Session.vim
+Sessionx.vim
+
+# Temporary
+.netrwhist
+# Auto-generated tag files
+tags
+# Persistent undo
+[._]*.un~
+
+### Windows ###
+# Windows thumbnail cache files
+Thumbs.db
+Thumbs.db:encryptable
+ehthumbs.db
+ehthumbs_vista.db
+
+# Dump file
+*.stackdump
+
+# Folder config file
+[Dd]esktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msix
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+# End of https://www.toptal.com/developers/gitignore/api/linux,windows,macos,vim
+
diff --git a/module.prop b/module.prop
index 44fd98e..804bfa4 100644
--- a/module.prop
+++ b/module.prop
@@ -1,6 +1,6 @@
id=multi-mount
name=Multi-Mount
-version=v1.0.0
+version=v1.1.0
versionCode=1
-author=clifforama
+author=lionheart1810
description=Mounts one or more filesystems (e.g. CIFS/SMB, NFS, etc.)
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