What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

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:
You seem to be missing a then in the second if.
 
Similar threads
Thread starter Title Forum Replies Date
A Example script for guest network ASUS Wi-Fi 14

Similar threads

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!
Back
Top