What's new

YazDHCP YazDHCP - feature expansion of DHCP assignments (increasing limit on the number of DHCP reservations)

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

That's not right. Can you try an update (uf) at the command line?
Presto! All entries are there of course. Now to find what happened.
First, why did the static IPs not 'take' for the devices that were unreachable until I rebooted the router?
Why was this directory emptied and no others (hopefully)?
 
Two questions:

Why isn't this in amtm yet?

When running the install script, I see two y/n prompts scrolling by, but neither wait for user input. Is that intented behaviour?

Code:
marco@RT-AC86U:/tmp/home/root# /usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/YazDHCP/master/YazDHCP.sh" -o "/jffs/scripts/YazDHCP" && chmod 0755 /jffs/scripts/YazDHCP && /jffs/scripts/YazDHCP install
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 30979  100 30979    0     0  91925      0 --:--:-- --:--:-- --:--:-- 98346
YazDHCP: Welcome to YazDHCP v1.0.1, a script by JackYaz

YazDHCP: Checking your router meets the requirements for YazDHCP

YazDHCP: New version of Advanced_DHCP_Content.asp downloaded

YazDHCP: New version of shared-jy.tar.gz downloaded


Do you want to export DHCP assignments and hostnames from nvram to YazDHCP DHCP client files? (y/n)
YazDHCP will backup nvram/jffs DHCP data as part of the export, but you may wish to screenshot https://10.0.12.1:8443/Advanced_DHCP_Content.asp

Enter answer (y/n):    YazDHCP: YazDHCP installed successfully!
 
Two questions:

Why isn't this in amtm yet?

I fear I have just answered my first question. The table with static leases is empty and following files are non-existent:

/jffs/addons/YazDHCP.d/.hostnames # YazDHCP_hostnames
/jffs/addons/YazDHCP.d/.staticlist # YazDHCP_staticlist
jffs/addons/YazDHCP.d/.optionslist # YazDHCP_optionslist

which causes running YazDHCP > Option 1 to result in

Code:
##########################################################
##                                                      ##
##  __     __          _____   _    _   _____  _____    ##
##  \ \   / /         |  __ \ | |  | | / ____||  __ \   ##
##   \ \_/ /__ _  ____| |  | || |__| || |     | |__) |  ##
##    \   // _  ||_  /| |  | ||  __  || |     |  ___/   ##
##     | || (_| | / / | |__| || |  | || |____ | |       ##
##     |_| \__,_|/___||_____/ |_|  |_| \_____||_|       ##
##                                                      ##
##                 v1.0.1 on RT-AC86U                   ##
##                                                      ##
##           https://github.com/jackyaz/YazDHCP         ##
##                                                      ##
##########################################################

1.    Process /jffs/addons/YazDHCP.d/DHCP_clients

x.    Export nvram to YazDHCP

u.    Check for updates
uf.   Update YazDHCP with latest version (force update)

e.    Exit YazDHCP

z.    Uninstall YazDHCP

##########################################################

Choose an option:    1

tail: can't open '/jffs/addons/YazDHCP.d/DHCP_clients': No such file or directory
tail: no files
YazDHCP: DHCP hostname list updated successfully

tail: can't open '/jffs/addons/YazDHCP.d/DHCP_clients': No such file or directory
tail: no files
YazDHCP: DHCP static assignment list updated successfully

tail: can't open '/jffs/addons/YazDHCP.d/DHCP_clients': No such file or directory
tail: no files
YazDHCP: DHCP options list updated successfully

Press enter to continue...

Seems like this needs some tinkering Jack? ;) I'm off to restore my backup...
 
Two questions:

Why isn't this in amtm yet?

When running the install script, I see two y/n prompts scrolling by, but neither wait for user input. Is that intented behaviour?

Code:
marco@RT-AC86U:/tmp/home/root# /usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/YazDHCP/master/YazDHCP.sh" -o "/jffs/scripts/YazDHCP" && chmod 0755 /jffs/scripts/YazDHCP && /jffs/scripts/YazDHCP install
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 30979  100 30979    0     0  91925      0 --:--:-- --:--:-- --:--:-- 98346
YazDHCP: Welcome to YazDHCP v1.0.1, a script by JackYaz

YazDHCP: Checking your router meets the requirements for YazDHCP

YazDHCP: New version of Advanced_DHCP_Content.asp downloaded

YazDHCP: New version of shared-jy.tar.gz downloaded


Do you want to export DHCP assignments and hostnames from nvram to YazDHCP DHCP client files? (y/n)
YazDHCP will backup nvram/jffs DHCP data as part of the export, but you may wish to screenshot https://10.0.12.1:8443/Advanced_DHCP_Content.asp

Enter answer (y/n):    YazDHCP: YazDHCP installed successfully!
Which ssh client are you using? you're the only person to report this

Code:
printf "\\n\\e[1mEnter answer (y/n):    \\e[0m"
    read -r confirm
    case "$confirm" in
        y|Y)
            :
        ;;
        *)
            return 1
        ;;
    esac
the above snippet shows that the terminal waits for you to respond by pressing a key. y or Y will continue, anything else will return out of the export function
 
there is a slight issue where the screenshot prompt is actually shown too late as the WebUI page has been replaced at that point, which will be fixed in the next version. this does not affect the export of nvram etc. however.

Check if you have any backup files in:
Code:
ls -la /jffs/addons/YazDHCP.d/
 
Last edited:
There's a typo in your command (YazDHHCP), but when corrected, this is the output:

Code:
marco@RT-AC86U:/tmp/home/root# ls -la /jffs/addons/YazDHCP.d/
drwxrwxrwx    2 marco    root             0 Feb 17 16:30 .
drwxr-xr-x   16 marco    root             0 Feb 17 16:17 ..
-rw-rw-rw-    1 marco    root             0 Feb 17 16:30 .hostnames
-rw-rw-rw-    1 marco    root             0 Feb 17 16:30 .optionslist
-rw-rw-rw-    1 marco    root             0 Feb 17 16:30 .staticlist
-rw-rw-rw-    1 marco    root         49387 Feb 17 16:17 Advanced_DHCP_Content.asp
 
How to proceed from here? I made a screenshot beforehand, just to be sure and backupped config and jffs. It seems like the files are empty, so can you help me restore the situation to prior to installing YazDHCP?

Thanks in advance.

Cheers,
Marco (M@rco ... if you remember ;) )
 
How to proceed from here? I made a screenshot beforehand, just to be sure and backupped config and jffs. It seems like the files are empty, so can you help me restore the situation to prior to installing YazDHCP?

Thanks in advance.

Cheers,
Marco (M@rco ... if you remember ;) )
Easiest if you have a backup for jffs and config. Always good to have something current to go back to when trying out new stuff.
 
Easiest if you have a backup for jffs and config. Always good to have something current to go back to when trying out new stuff.
Will this also restore the replaced Advanced_DHCP_Content.asp page? Because I will overwrite the location above when restoring my backup from /jffs and I don't know where the original page resides.
 
Not sure whether related but the export button on the replaced Advanced_DHCP_Content.asp page results in a error as well:

2021-02-17.png
 
There's a typo in your command (YazDHHCP), but when corrected, this is the output:

Code:
marco@RT-AC86U:/tmp/home/root# ls -la /jffs/addons/YazDHCP.d/
drwxrwxrwx    2 marco    root             0 Feb 17 16:30 .
drwxr-xr-x   16 marco    root             0 Feb 17 16:17 ..
-rw-rw-rw-    1 marco    root             0 Feb 17 16:30 .hostnames
-rw-rw-rw-    1 marco    root             0 Feb 17 16:30 .optionslist
-rw-rw-rw-    1 marco    root             0 Feb 17 16:30 .staticlist
-rw-rw-rw-    1 marco    root         49387 Feb 17 16:17 Advanced_DHCP_Content.asp
so there's no backup files at all. once you restore jffs, check the contents of
/jffs/nvram/dhcp_hostnames
/jffs/nvram/dhcp_staticlist

(assuming this is on your AC86U in your signature)
 
assuming jffs backup is before you installed YazDHCP, yes

Yes, it was. Prior to restoring I rebooted the RT-AC86U and to my surprise (even though I cleaned my cache in the meantime to see if that would fix the export error above) it showed the original Advanced_DHCP_Content.asp without your modifications. Even the table with the static leases table was filled again, as if I never installed YazDHCP in the meantime. I'm not sure what happened here. I just restored the configuration and jffs, everything is back to normal, as far as I can tell.

/jffs/nvram/dhcp_hostnames
/jffs/nvram/dhcp_staticlist

both contain the information expected.

Any clues what happened here? I'm completely clueless.

Best regards,
Marco
 
Yes, it was. Prior to restoring I rebooted the RT-AC86U and to my surprise (even though I cleaned my cache in the meantime to see if that would fix the export error above) it showed the original Advanced_DHCP_Content.asp without your modifications. Even the table with the static leases table was filled again, as if I never installed YazDHCP in the meantime. I'm not sure what happened here. I just restored the configuration and jffs, everything is back to normal, as far as I can tell.

/jffs/nvram/dhcp_hostnames
/jffs/nvram/dhcp_staticlist

both contain the information expected.

Any clues what happened here? I'm completely clueless.

Best regards,
Marco
I'm not sure either. When you press Y for the export, YazDHCP checks for those files and if they exist, backs them up and then uses the contents to populate the CSV. I would be very interested to know if you still see the issue with the prompt being missed, and if you do, what happens with those files and if they are deleted and backed up
 
I would be very interested to know if you still see the issue with the prompt being missed, and if you do, what happens with those files and if they are deleted and backed up

Sorry if I'm a bit slow, my brain isn't anymore what it used to be, but do you mean it would be helpful to try again? I can also use putty for example if that's helpful to debug? Fwiw, I haven't had any issue with any other of your scripts (or the add-ons by the other devs) when it comes to user prompts or any kind of other user input.
 
Sorry if I'm a bit slow, my brain isn't anymore what it used to be, but do you mean it would be helpful to try again? I can also use putty for example if that's helpful to debug? Fwiw, I haven't had any issue with any other of your scripts (or the add-ons by the other devs) when it comes to user prompts or any kind of other user input.
its the same code so that's even weirder
 

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