ianw1974 / zimbra-build-scripts

Zimbra Build Helper Script - makes it easier to build Zimbra
MIT License
58 stars 23 forks source link

ubuntu 20 /sbin/ifconfig: not found #30

Closed neidiom closed 1 year ago

neidiom commented 1 year ago

When upgrading I got this error

Setting defaults...sh: 1: /sbin/ifconfig: not found

and

sh: 1: netstat: not found

Is it possible to add a dependency to the net-tools package?

ianw1974 commented 1 year ago

Yeah I had this recently when debugging a problem someone else had: https://github.com/ianw1974/zimbra-build-scripts/issues/27#issuecomment-1673564798

Although I didn't see the netstat error. But yeah, I think this can be patched - ideally I could ask Zimbra zm-build to fix on their site by opening a PR with them which would be the better way in the long term. TBH net-tools is supposed to be deprecated since a long time, to favour using ip addr commands, or netstat being replaced with ss. Although I do personally use it mostly because I got used to ifconfig and netstat :)

The other alternative is I just add it to the install_deps function in my script rather than ask Zimbra to patch theirs - easier and quicker at least.

I'll take a look at this today, since it's a quick fix.

ianw1974 commented 1 year ago

Adding to the build script would only solve the problem assuming that Zimbra is then installed on the same server where the build script was used. I don't tend to use my live servers to build something, I have a separate server for that so in majority of cases, it won't solve anything. But I can put it into the build script since it won't harm.

Solving it within Zimbra's repos before building though is going to take a bit more time to figure out the best place to put it - since I need the install.sh to run the necessary step before Zimbra is installed. Should be possible though.

ianw1974 commented 1 year ago

I think I've found the ideal place for it, just spinning up an Ubuntu 20.04 server now to check/test. The fix will be for all distros supported by my scripts, so anything EL8 based or Ubuntu based. Assuming of course the test works :)

Will update later on progress.

ianw1974 commented 1 year ago

Fixed here: 3c3c6f38b3e5b5fed7990686aafdfc0c6b4c13db and here: c8611f10eaf52c3e7406a63bcb0eeaf59c12a7f4

I ran ZCS-9 installer on Ubuntu 20.04 and it installed net-tools. So it'll work for ZCS-10 too. It's been patched in a single place which is introduced into the build during the build process.

neidiom commented 1 year ago

Thank you @ianw1974