-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: OpenRC initscript #114
Comments
+1 to all of the above. I don't really write the distro integration scripts, I just pull them. Usually when I try to edit them, I break them.
|
I'm referring to this line in beesd where
I'm referring to the invocation of |
You might also want to look at #104 which aims to make the script configuration a lot more stateless. |
I wouldn't consider this a distro integration script any more than the systemd service file is. OpenRC is used on other distros as well as Gentoo, and I don't think anything in my script is Gentoo-specific. The issue of UUIDs in config files is at least partially solved by OpenRC multiplexing, since you can have I could make this into a PR, but I'm not sure how to integrate it into the build system in terms of things like install paths and enabling/disabling installation. The
That seems like a change which could be done independently. My script doesn't use One thing that might be useful is if it were possible to just run |
I'm the maintainer of the Gentoo ebuild. @Zygo if you don't mind I come up with a suggestion, maybe also fixing the other problems mentioned here. |
I'm the one who recently opened a bunch of bugs on the gentoo bugzilla about bees - thanks for fixing them! I considered submitting this there as well, but figured it'd be better to do it upstream. By the way, @kakra, if it's not too off-topic, I noticed your fix of the version UNKNOWN issue set the version to "v${PV}" so that the help output displays "version v0.6.1" which seems redundant (version version 0.6.1?). Why not just make it "${PV}"? See as an example the output of |
That's to match upstream. Bees itself uses the Git tag which is prefixed by "v". |
@kakra, any news on this? I just installed sys-fs/bees on Gentoo, but there is no init.d script. @automorphism88's links at the top of this issue don't work anymore. |
I'm guessing this init script got lost then? |
I'm going to update the ebuild soon, let me move this up in my todo list then. @MCPO-Spartan-117 Thanks for pinging... |
I'm using Gentoo, and since bees comes with a systemd service but I'm using OpenRC, I decided to write my own initscript. It is based somewhat on the
beesd
script (which I couldn't just use directly since it wouldn't work withstart-stop-daemon
), and designed to work with aconf.d
file that's similar to the one that's installed in/etc/bees
, but with some additional options added to control logging and {io,}nice level. It also avoids bashisms so that it can be run with dash as/bin/sh
.Is this something you would be interested in merging upstream? My
/etc/init.d
file can be found here: https://github.com/automorphism88/gentoo-overlay/blob/master/sys-fs/bees/files/bees.initd and the corresponding template/etc/conf.d
file can be found here: https://github.com/automorphism88/gentoo-overlay/blob/master/sys-fs/bees/files/bees.confd. Note that while this initscript works for me, it should be considered experimental. I haven't tried to get this merged into the official Gentoo ebuild yet since I figured it would be even better to upstream the script directly into bees.A few things I noticed about the
beesd
script when I was using it as a reference were:chmod 700
the database file instead ofchmod 600
? Executable permission doesn't seem to be necessary.stat -c %s FILE
is a simpler, faster, and more portable way of checking file size than the method used in the beesd script (which, I believe, relies on a GNU extension in sed to interpret\t
as tab). Incidentally,stat -c %i
can also be used to check whether a directory is a btrfs subvolume, since a btrfs subvolume will have an inode number of 256.noatime
? Unlike btrfs-specific mount options like compression, this one can be set per-subvolume, so it will default torelatime
even if the rest of the filesystem is mounted withnoatime
. Probably wouldn't make much difference in this case, I'm just in the habit of usingnoatime
everywhere unless there's a specific need to do otherwise.The text was updated successfully, but these errors were encountered: