What's new

amtm amtm - the Asuswrt-Merlin Terminal Menu

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

does the new script also update Dnscrypt-Proxy to the latest version 2.0.22? I believe the script currently still install 2.0.19.
amtm runs external scripts. What version is being installed depends on what the script author puts in the installer file.
The version dnscrypt installer uses is 2.0.19 as seen here at the top: https://github.com/thuantran/dnscrypt-asuswrt-installer/blob/master/installer

dnscrypt installer is since amtm 2.0 deprecated and new installs are no longer supported. Only existing or manual installations show up in amtm 2.0.
The same applies to Stubby DNS, though Stubby can still be installed through amtm if the firmware does not support native DoT.
 
I've pushed an amtm update, no version change
- Automatic swap file error correction when opening amtm
- Updates the disk-check script automatically if newer version is available when updating amtm
- Code corrections and maintenance

Use u to update amtm.
 
Last edited:
I've pushed another amtm update, still no version change
- Road beautification project: Swap file creation is now consistent with the overall amtm experience
- Covering missing case for automatic swap file error correction when opening amtm

Use u to update amtm.
 
I've pushed an amtm update, no version change
- Automatic swap file error correction when opening amtm
- Updates the disk-check script automatically if newer version is available when updating amtm
- Code corrections and maintenance

Use u to update amtm.
Just now updated to amtm v2.0 and it keeps saying I don't have a swap file and removes the reference to it in post-mount.

You have myswap.swp hard-coded, which I assume was also the case for amtm v1.9, but I've always used ".swap" for my swap file with no problem up until now. Is it now working as intended or should it recognize a swap file no matter what it's called?
 
Just now updated to amtm v2.0 and it keeps saying I don't have a swap file and removes the reference to it in post-mount.

You have myswap.swp hard-coded, which I assume was also the case for amtm v1.9, but I've always used ".swap" for my swap file with no problem up until now. Is it now working as intended or should it recognize a swap file no matter what it's called?
I have to start somewhere to check if a swap file is present but not activated because the reference in post-mount is wrong.
To do that I use "$(find /tmp/mnt/*/myswap.swp 2> /dev/null)". Is yours called "myswap.swap"? That would be simple to fix.
That find result determines if a swap file is present, if none is found the reference gets deleted.

Edit: There's always a better way, let me cook something up.
 
Last edited:
I have to start somewhere to check if a swap file is present but not activated because the reference in post-mount is wrong.
To do that I use "$(find /tmp/mnt/*/myswap.swp 2> /dev/null)". Is yours called "myswap.swap"? That would be simple to fix.
That find result determines if a swap file is present, if none is found the reference gets deleted.

Edit: There's always a better way, let me cook something up.
Couple things come right to my mind;

On my AC86U the nvram location "apps_swap_file" contains the name but not the path of the swap file.
You could test to see if the file found by swapjffs exists (and I suppose see if basename $swapjffs = $(nvram get apps_swap_file), ASSUMING apps_swap_file is consistent across all routers and recent firmware)

And no, mine is named ".swap" - yes, I can change it, I was wondering if the fact that it was recognized without issue in v1.9 was a fluke. But I do prefer for it to be a dot file, although my reasoning may not be sound or rational.
 
On my AC86U the nvram location "apps_swap_file" contains the name but not the path of the swap file.
You could test to see if the file found by swapjffs exists (and I suppose see if basename $swapjffs = $(nvram get apps_swap_file), ASSUMING apps_swap_file is consistent across all routers and recent firmware)
nvram get apps_swap_file returns .swap on all routers I guess. It does on the two I have on atm. There is no such swap file present. No myswap.swap nor *.swap.
So that test is futile.

Yours is simply called ".swap" and is recognized by Skynet? Damn Adamm, way ahead of me!
But you do have a reference line in post-mount starting with "swapon /path/to/file" right?

And no, mine is named ".swap" - yes, I can change it, I was wondering if the fact that it was recognized without issue in v1.9 was a fluke. But I do prefer for it to be a dot file, although my reasoning may not be sound or rational.
That's alright, I'll make it work. But Adamm and I agreed on a standard: A swap file and it's name being myswap.swp. This way we all can recognize and manage each others creation. I recall seeing "myswap.swp" hard coded in Skynet too.
 
nvram get apps_swap_file returns .swap on all routers I guess. It does on the two I have on atm. There is no such swap file present. No myswap.swap nor *.swap.
So that test is futile.
Ahh, well, figured it couldn't be that easy.
Yours is simply called ".swap" and is recognized by Skynet? Damn Adamm, way ahead of me!
But you do have a reference line in post-mount starting with "swapon /path/to/file" right?
Yes, it is simply called ".swap" and is recognized by Skynet. Adamm isn't way ahead of you, like I said, amtm v1.9 recognized my swap file and was just fine with it. You regressed. ;-)

The line in my post-mount happens to be in an if-then function and I even let go of my OCD enough to not indent the lines in the if-then so it would be recognized.
Code:
# If device has swapfile, start swap
SWP="$(find $1/.swap 2> /dev/null)"
if [ "$SWP" ]; then
logger -t Swap "Starting swap"
swapon /tmp/mnt/usbssd/.swap
fi
That's alright, I'll make it work. But Adamm and I agreed on a standard: A swap file and it's name being myswap.swp. This way we all can recognize and manage each others creation. I recall seeing "myswap.swp" hard coded in Skynet too.
I wasn't aware of the agreement, I apologize.
 
The line in my post-mount happens to be in an if-then function and I even let go of my OCD enough to not indent the lines in the if-then so it would be recognized.
That's only halve of what I proposed to use, but Adamm disagreed because of backwards compatibility.
Yours would not mount if not found on the "usbssd" mount.
I proposed this line in post-mount, which would always work if the file is found:
Code:
[ "$(find $1/myswap.swp 2> /dev/null)" ] && swapon "$1"/myswap.swp
But again, this would not work with the current tests.
I'll get yours to work, you just wait.

You can indent your code just fine. Look at my /opt/share/diversion/file/post-conf.div which is sourced in dnsmasq.postconf. It does a LOT when restarting Dnsmasq ;).
 
Yes, it is simply called ".swap" and is recognized by Skynet. Adamm isn't way ahead of you, like I said, amtm v1.9 recognized my swap file and was just fine with it. You regressed. ;-)
I did indeed but unintentionally. The pre-v2.0 code recognizes your swap file.
 
I managed to set my ISP's ONU to bridge myself and finally started using my brand new RT-AC86U. I decided to give amtm another go, this time following @L&LD's tutorial to the letter, but I get the following error when trying to format the USB drive:

Code:
Formatting /tmp/mnt/SANDISK now!

 Unmounting device(s)
umount: can't unmount /tmp/mnt/SANDISK: Device or resource busy

  Filesystem(s) did not unmount
  See error above for reason

 Press [Enter] to return to menu

I then tried the following, from this page:

  1. Unmount the disk from the ASUS web GUI
  2. Zero the disk to eradicate the existing partition table
  3. Reboot the router to clear memory of the old partition table from the kernel
  4. You should then continue on from step 5 as normal

It didn't help. Drive was back to its listed, but unmounted state (similar to the issue I had before) and I thought I had yet another paperweight in my hands. Luckily, I was able to format it again to NTFS and remount it, but the original error message ("Device or resource busy") persists.

Any tips?
 
I managed to set my ISP's ONU to bridge myself and finally started using my brand new RT-AC86U. I decided to give amtm another go, this time following @L&LD's tutorial to the letter, but I get the following error when trying to format the USB drive:

Code:
Formatting /tmp/mnt/SANDISK now!

 Unmounting device(s)
umount: can't unmount /tmp/mnt/SANDISK: Device or resource busy

  Filesystem(s) did not unmount
  See error above for reason

 Press [Enter] to return to menu

I then tried the following, from this page:



It didn't help. Drive was back to its listed, but unmounted state (similar to the issue I had before) and I thought I had yet another paperweight in my hands. Luckily, I was able to format it again to NTFS and remount it, but the original error message ("Device or resource busy") persists.

Any tips?
Don't have any WinSCP or terminal open to the path of the disk. Best to close anything that accesses it. Samba could also be accessing it in USB Applications in the WebUI. Disable file sharing there first before running fd in amtm.
 
  • Like
Reactions: EeK
Samba could also be accessing it in USB Applications in the WebUI. Disable file sharing there first before running fd in amtm.

Thank you, that was it. "UPnP Media Server" was enabled by default under USB Application. Formatted the disk successfully for the first time and will now proceed with the installation of scripts.
 
The line in my post-mount happens to be in an if-then function and I even let go of my OCD enough to not indent the lines in the if-then so it would be recognized.
You are right to not indent the "swapon " line. I grep for ^swapon to make sure it is not out commented.
 
Thank you, that was it. "UPnP Media Server" was enabled by default under USB Application. Formatted the disk successfully for the first time and will now proceed with the installation of scripts.
You can re-enable it after.
Success finally!
 
  • Like
Reactions: EeK
Success! Everything went smoothly and I was able to install Diversion, Skynet and Stubby DNS. Does that mean I can uninstall my ad blocking add-ons on Firefox? I use uBlock Origin, Privacy Badger and Decentraleyes.

Also, I tried installing pixelserv-tls (beta version), and got a confirmation message that it was, indeed, installed correctly. However, on amtm's main menu, "ps" is still listed over a red square, with the option to install it, unlike other properly installed scripts, which have green squares and "open" written on them.
 
Success! Everything went smoothly and I was able to install Diversion, Skynet and Stubby DNS. Does that mean I can uninstall my ad blocking add-ons on Firefox? I use uBlock Origin, Privacy Badger and Decentraleyes.
As a start, disable the extensions and see how if feels.
Also, I tried installing pixelserv-tls (beta version), and got a confirmation message that it was, indeed, installed correctly. However, on amtm's main menu, "ps" is still listed over a red square, with the option to install it, unlike other properly installed scripts, which have green squares and "open" written on them.
What does that mean? Did you install pixelserv-tls trough amtm? If it does not show up as installed in amtm, then it's not a supported way of installing pixelserv-tls betas.
 
Also, I tried installing pixelserv-tls (beta version), and got a confirmation message that it was, indeed, installed correctly. However, on amtm's main menu, "ps" is still listed over a red square, with the option to install it, unlike other properly installed scripts, which have green squares and "open" written on them.

Same here.
 

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