4 ms·
> What can I possibly gain by switching which DHCP client Yesterday I switched to systemd-networkd on debian to gain the feature of having the hostname be set
by yosamino 5y ago
> What can I possibly gain by switching which DHCP client
Yesterday I switched to systemd-networkd on debian to gain the feature of having the hostname be set via DHCP and not have to write a script myself. In the process I pulled in a javascript dependency via policykit, which is giving me pause and I am re-evaluating if my approach is correct here.
But for this feature I had to switch DHCP server and client. TBF it's not something that comes up all the time, but it sure is something I thought was more commonly implemented.
- xyzzy_plugh 5y ago> In the process I pulled in a javascript dependency via policykit, which is giving me pause and I am re-evaluating if my approach is correct here. To be fair, policykit is great. It solves a real problem (namely is this user allowed to peform this action, which traditional POSIX permissions do not solve in a portably) in a very sane way that is totally optional to opt in to. Should polkit use a different, turing complete language than JavaScript? I don't know, probably, but it's not an awful choice. There is definitely more developer literacy for JS than, say, Lua or some other bespoke monstrosity they could've picked instead.
- someperson 5y agoDoesn't POSIX and Linux Standard Base already mandate certain scripting languages to be preinstalled, such as Python?
- thristian 5y agoI've heard a rumour that POSIX mandates that Perl be installed, although I haven't been able to substantiate it. POSIX-described Turing-complete interpreters include at leat the Bourne shell, awk, and sed, none of which you probably want to use for implementing a security policy. Apparently LSB 5.0 mandates[1] both Perl (5.8) and Python (2.4), but that won't pacify anyone with an axe to grind about applications making Linux-specific assumptions. [1]: https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Languages/LSB-Languages/book1.html https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Languages...
- cesarb 5y ago> Apparently LSB 5.0 mandates[1] both Perl (5.8) and Python (2.4) Wow, that didn't age well. That document actually says Python "2.4.2 or greater" and Perl "5.8.8 or greater", which doesn't help if the installed interpreters are Python 3.10 and Perl 6.c (2018.06), since both are greater than the specified versions but incompatible with them. Even if it had specified the major release (that is, Python 2.x greater than 2.4.2 and Perl 5.x greater than 5.8.8), that wouldn't help once those major releases are no longer maintained.
- dale_glass 5y agoPerl 6 isn't really a thing anymore. Python3 requires some code changes, but on the whole is the same language. Perl 6 was intended to be an upgrade from 5, but over time developed into a completely new language that shared stylistic similarities to Perl 5. Perl 6 can't be compatible with Perl 5 to any large extent because XS isn't a thing anymore, so any modules that had binary parts to them can't be easily ported. These days Perl 6 got renamed to "Raku", to signify that it's its own, independent language. The Perl 5 line continues to exist and apparently plans for the next major version to be Perl 7.
- gnubison 5y ago> I've heard a rumour that POSIX mandates that Perl be installed, although I haven't been able to substantiate it. It’s not: https://shellhaters.org https://shellhaters.org
- chmod775 5y ago> Lua or some other bespoke monstrosity Lua is definitely the opposite of 'bespoke monstrosity'. It's pretty much the intersection of tiny interpreter, fast execution, and simple language.
- xyzzy_plugh 5y agoApologies if I mistyped this, Lua is not remotely a monstrosity. It's great! But I don't think it would be appropriate here, and I think more developers can grok JS in this day and age.
- yrro 5y agoThe Debian policykit packages have (frustratingly) diverted from upstream here. They do not pull in mozjs, sanding users with the older and far less flexible rules files.
- rsmarples 5y agoIf you don't like it, try dhcpcd I which can set the hostname via DHCP by default. On Linux there are no hard dependencies although your distro may enforce a udev dependency.