What's new

ntpMerlin ntpMerlin and connmon messing around with post-mount

  • 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!

Jeffrey Young

Very Senior Member
@Jack Yaz

I have a small problem with ntpMerlin and cronmon. I am using an SSD drive on my AC86U that has multiple partitions on it (one for entware, one for a future swap partition and one that I am keeping NTFS).

Since I use Samba on the router, the router wants to auto-mount all three partitions at startup. That is fine. However, to keep all your start up scripts from trying to run with each partition that gets mounted, I test for the right mount point first (entware volume), and only run your start up scripts if the right mount point is passed (post-mount is called with one arg which is the mount point).

However, it looks like every 10 minutes ntpMerlin and cronmon checks post-mount and takes your script start entries and moves them from my test statement to the end of the post-mount script. Defeating what I am trying to do. Any easy way of getting this behavior to stop? Save manually messing with your script (I see where it is doing it).

Not a biggy as there seems to be no harm just letting your scripts complain when they are trying to start multiple times, but if I can avoid it, it would make me happy. Or maybe I am fussing over nothing.

It would make me even happier if the router would stop auto-mounting every partition it finds when Samba is being used just because it can, but I guess I can't have everything.

Cheers and good work.
 
@Jack Yaz

I have a small problem with ntpMerlin and cronmon. I am using an SSD drive on my AC86U that has multiple partitions on it (one for entware, one for a future swap partition and one that I am keeping NTFS).

Since I use Samba on the router, the router wants to auto-mount all three partitions at startup. That is fine. However, to keep all your start up scripts from trying to run with each partition that gets mounted, I test for the right mount point first (entware volume), and only run your start up scripts if the right mount point is passed (post-mount is called with one arg which is the mount point).

However, it looks like every 10 minutes ntpMerlin and cronmon checks post-mount and takes your script start entries and moves them from my test statement to the end of the post-mount script. Defeating what I am trying to do. Any easy way of getting this behavior to stop? Save manually messing with your script (I see where it is doing it).

Not a biggy as there seems to be no harm just letting your scripts complain when they are trying to start multiple times, but if I can avoid it, it would make me happy. Or maybe I am fussing over nothing.

It would make me even happier if the router would stop auto-mounting every partition it finds when Samba is being used just because it can, but I guess I can't have everything.

Cheers and good work.
My scripts already test for entware so your check is unnecessary
 
Are you indenting the lines when you put them in an if condition? Leave them at the start of the line and see if that helps, if you still want to keep that check.
 
Are you indenting the lines when you put them in an if condition? Leave them at the start of the line and see if that helps, if you still want to keep that check.
Yes I was. I will give that a go. Just trying to keep them from trying to start, when already started should the entware partition be the first to be mounted. I will report back.

EDIT: That worked. Should have looked at Jack's script a little closer - I would have seen that. That will teach me for doing a "quick" glance.
 
Last edited:
Are you indenting the lines when you put them in an if condition? Leave them at the start of the line and see if that helps, if you still want to keep that check.

That worked @dave14305

That teaches me for doing a "quick" glance at Jack's script. I should have seen that. Post-mount does not look clean, but works.

Maybe a covid-19 project at home tonight to come up with a better test.

Thanks
 
If 'cronmon' is 'connmon', perhaps editing the post title is appropriate? :)
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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