What's new

mount in script post-mount can not work

saccleo

Regular Contributor
I set up in post-mount to replace the built-in acme.sh (the updated acme.sh installed at /opt/bin , actual path is /mnt/star/entware/bin ) via mount binding. The post-mount content is as follows:
Bash:
#!/bin/sh
if [ -d "$1/.home" ] ; then
mount --bind $1/.home /root
fi
if [ -d "$1/entware/bin/acme.sh" ]
mount --bind $1/entware/bin/acme.sh/acme.sh /usr/sbin/acme.sh
mount --bind $1/entware/bin/acme.sh/dnsapi /usr/sbin/dnsapi
fi
cru a logrotate "5 0 * * * /opt/sbin/logrotate /opt/etc/logrotate.conf >> /opt/tmp
/jffs/scripts/uiScribe startup "$@" & # uiScribe

After every reboot, when the system is fully operational, /root mounts correctly, but acme.sh does not. Manual mount --bind works fine.What could be the reason, and how to resolve it? Thanks.
Hardware model: RT-AX86U Pro, firmware version 3006.102.4.
 
Last edited:

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Back
Top