Ah, I realize the script is complex, and has a dependency, so you probably wouldn't have installed and tried it.
Don't tell anybody else but I'm using systemd here so there may be some conflicts...
Would you please file some bugs against the project on gitlab?
Done.
]]>Actually, this tool will transform how I write my --help screens... who doesn't want an auto-generated man page?! Regardless of whatever happens with this systemdtl abomination, help2man is a definite positive thing I've learned.
]]>Would you please file some bugs against the project on gitlab? Otherwise, I'll do it.
And, since you brought up lintian, is there some package I should be using for builds on a Devuan box, so that I don't get this error?
Now running lintian systemdtl_0.0.1-1+devuan_amd64.changes ...
Could not find a profile matching "{VENDOR}/main" for vendor devuan
Lintian::Profile::_find_vendor_profile(Lintian::Profile=HASH(0x55d82ca5b490)) called at /usr/share/perl5/Lintian/Profile.pm line 140
Lintian::Profile::new("Lintian::Profile", undef, ARRAY(0x55d82a4852d0), HASH(0x55d82a7ba3a0)) called at /usr/bin/lintian line 216
dplint::load_profile(undef) called at /usr/share/lintian/commands/lintian.pm line 751
eval {...} called at /usr/share/lintian/commands/lintian.pm line 751
main::main() called at /usr/bin/lintian line 46
eval {...} called at /usr/bin/lintian line 46
main::__ANON__("/usr/share/lintian/commands/lintian.pm") called at /usr/bin/lintian line 115
dplint::run_tool("/usr/bin/lintian", "lintian") called at /usr/bin/lintian line 291
dplint::main() called at /usr/bin/lintian line 375
I already tried
$ apt-file search /usr/share/lintian/profiles/devuan
$
EDIT:
Huh, I found devuan-lintian-profile which adds such a directory. Let me guess, apt-file has a cache that needs to be updated just like apt-file?
Nice script! Guess you didn't need my "help" then
Is it simple to output the usage information with a --help option? That would allow you to create a man page with help2man and eliminate one of the Lintian warnings:
W: systemdtl: copyright-has-url-from-dh_make-boilerplate
W: systemdtl: copyright-without-copyright-notice
W: systemdtl: binary-without-manpage usr/sbin/systemctl
It's not important ofc but I do like to shut Lintian up when possible.
]]>Im a firm believer of it must work for the intended operating system without too many indirection's, if not then well look elsewhere.
]]>I guess version 0.0.2 will include a dummy hostnamectl and systemd-detect-virt based on my current notes for joining a devuan system to a freeipa domain. I guess the virt-what wasn't good enough for the systemd people, so they subsumed that task for themselves.
]]>And after writing my own version, I learn that debian/Devuan packages the systemctl from the docker-systemctl-replacement, However, it appears to actually read the systemd-related files (as in unit files) so it does not do what I want it to do, so I needed to write my version anyway.
]]>I realize this is a bizarre topic. Bear with me.
It's not bizarre at all. I think it's a good idea. I had the same idea about two years ago when I was learning how to set up a Debian server.
Phil
]]>@HevyDevy, well, I really do want to be systemd-free, and if I have to write an interface to let things think they're just calling the systemctl command, I can live with that. I think it's rather pretentious of a package to hard-code in systemctl commands, but seeing as how FreeIPA is built by the Fedora/RHEL people, I can see why they don't bother to look beyond it.
For the longest while, to support my FreeIPA installs, I've just been making an empty systemctl script:
#!/bin/sh
true
But I feel like I can do better.
]]>Something like this at /usr/local/bin/systemctl:
#!/bin/sh
case "$1" in
start) service "$2" start ;;
stop) service "$2" stop ;;
esac
Does anyone have, or know of any, script that is designed to take commands like systemctl, and run the real commands? For example, if I run "systemctl start httpd" it will translate it to and execute, "service httpd start."
I think writing such a script, if none exists already, would be easier than trying to patch freeipa to use hard-coded "service httpd start" commands and similar. I started down that route, but some commands include things such as --now and condrestart, which I might need to write a script for, even if it's more basic than a real conditional restart (for which I will have to RTFM to know the condition it depends on).
If nobody has any pointers, I will get started on such a script. I think I'll call it the undiscoverable term "systemdtl," for System Desire to Live. However, I would love to build on somebody else's work should such a thing exist and be suitably licensed.
]]>