WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: dhclient (v11.1) does not work (missing file)  (Read 6208 times)

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
dhclient (v11.1) does not work (missing file)
« on: July 12, 2021, 11:31:56 AM »
Hi all,

I am using TC 11.1 and I use dhclient with VLAN. Unfortunately it does not work because it complains about a missing script

execve (/sbin/dhclient-script, ...): No such file or directory

I have copied that script from an Ubuntu 20.04 and it was requiring ip then I have installed iproute2.tcz and everything started to work smoothly.

I think that this a bug/defect to fix: the script should be included into dhcp.tgz

Cheers, R.

P.S.: also the directory /var/db need to be created with mkdir -p /var/db.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: dhclient (v11.1) does not work (missing file)
« Reply #1 on: July 13, 2021, 03:39:43 AM »
You could pm the extension maintainer and request an update.

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: dhclient (v11.1) does not work (missing file)
« Reply #2 on: July 13, 2021, 11:10:25 AM »
Hi Juanito, I do not know who is the dhcp maintainer. I hope s/he will read this post. Thank you, R.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11573
Re: dhclient (v11.1) does not work (missing file)
« Reply #3 on: July 13, 2021, 11:51:50 AM »
Hi Roberto A. Foglietta
The maintainer is andyj. I sent him a PM. You can find the maintainer by checking the  Extension_by  field in the  .info file:
http://tinycorelinux.net/11.x/x86/tcz/dhcp.tcz.info

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: dhclient (v11.1) does not work (missing file)
« Reply #4 on: July 13, 2021, 02:58:03 PM »
It might be a few weeks, I'm out of town. It isn't installed by the build script for some reason, I will have to add it to the extension build script. If there are any TC specific changes to the default script I can incorporate them if you let me know.

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: dhclient (v11.1) does not work (missing file)
« Reply #5 on: July 25, 2021, 09:21:17 AM »
Hi Andyj, I am using the script took by Ubuntu in which a made a simple change.

I added a couple of

2>/dev/null

because

chown --reference

is not supported and IMHO not useful for TinyCore needs.

Cheers, -R
« Last Edit: July 25, 2021, 09:27:25 AM by Roberto A. Foglietta »

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: dhclient (v11.1) does not work (missing file)
« Reply #6 on: July 26, 2021, 07:33:07 AM »
I have attached the script for linux that comes with the dhcp source. I don't know why the dhcp build routines don't install it, but if you can make a patch against it that works on TC I can add it to the extension.

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: dhclient (v11.1) does not work (missing file)
« Reply #7 on: July 27, 2021, 08:52:11 AM »

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: dhclient (v11.1) does not work (missing file)
« Reply #8 on: July 27, 2021, 11:53:24 AM »
I didn't see any scripts in the tgz file, and it's not obvious to me which of the files above it might be the one. Please provide a patch against the file I posted.

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: dhclient (v11.1) does not work (missing file)
« Reply #9 on: July 28, 2021, 02:00:15 AM »
@andyj: sorry, my mistake - I linked the wrong tarball

https://github.com/robang74/tinycore-editor/blob/main/tinycore/changes/tccustom.tgz

However, the script is in attachment

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: dhclient (v11.1) does not work (missing file)
« Reply #10 on: August 13, 2021, 09:50:23 AM »
@Andyj, any news about the dhclient repackaging?

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: dhclient (v11.1) does not work (missing file)
« Reply #11 on: August 13, 2021, 05:10:26 PM »
The script you posted looks very different from the one that comes with the source. If I include that one, who will maintain it? Do you want to take over maintaining the dhcp extension?

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: dhclient (v11.1) does not work (missing file)
« Reply #12 on: August 13, 2021, 06:33:29 PM »
The script you posted looks very different from the one that comes with the source. If I include that one, who will maintain it? Do you want to take over maintaining the dhcp extension?

I took the first script I found and the only change I did was adding 2>/dev/null to ignore some harmless error.
I suggest you to go with the script that comes with the dhclient source tarball.  You can test your it with this:

https://github.com/robang74/tinycore-editor

Follow the README.txt for the quick steps. In the tinycore/tinycore.conf choose the 22MB selection of TCZ that have dhclient.
The distro boot with nodhcp and then do dhcp into afterboot.sh - but this detail is irrelevant, when you do dhclient in the console the script will run. Just a suggestion: delete the dhclient cache in such a way it tries do get the ip from scratch.


Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: dhclient (v11.1) does not work (missing file)
« Reply #13 on: August 13, 2021, 06:48:21 PM »
This extension is intended to be for a dhcp server. That it has a client is a bonus, but as TC already has a dhcp client I don't see a need to debug a script I have little time to do and no use for. Apparently you are the one and only person who does want to use the client functionality. I will include the script that comes with the source tarball, but the script you are using sounds like something that is probably custom to your installation. You should plan on maintaining your copy of it along with your config files.

Offline Roberto A. Foglietta

  • Full Member
  • ***
  • Posts: 212
    • personal home page
Re: dhclient (v11.1) does not work (missing file)
« Reply #14 on: August 14, 2021, 03:30:04 AM »
I will include the script that comes with the source tarball

Let me know when it will be ready the new tcz. I will test for you.

Take in consideration that the script will require bash to run, so bash would be a dependency of dhclient/server.

Differently the #!/bin/bash at the beginning of the script should be changed in #!/bin/ash. It is up to you.
« Last Edit: August 14, 2021, 03:32:31 AM by Roberto A. Foglietta »