dinit
dinit copied to clipboard
serverless dinitctl
In a installation dinit has never been launched yet, so I cant enable important services like networkmanager, ssh... (I dont remember this problem before, is this a new change?)
I'd like to dinitctl to enable/disable services without dinit server, or at least enable... if I execute the command as root. Always or with a option ? or maybe a workaround ? Thanks.
I do want this to be possible, but no, it's never worked that way.
The workaround I guess is to create the link yourself. I.e. dinitctl enable xyz just looks in the boot service for a waits-for.d = directive to find a directory, then creates a symbolic link in that directory (with the name xyz, with the link referring to the xyz service description file, although it doesn't actually matter what it links to).
In a installation dinit has never been launched yet, so I cant enable important services like networkmanager, ssh... (I dont remember this problem before, is this a new change?)
What do you mean by "installation"? Artix installer?
Ok.
dinitctl enable xyzjust looks in the boot service for awaitsfor.d =directive to find a directory, then creates a symbolic link in that directory (with the namexyz, with the link referring to thexyzservice description file
Is this what u want it to do or what it does today ? because for me it doesnt enable the service, just give an error messagge.
Anyway, at the moment I can make a symlink, correct ?
What do you mean by "installation"? Artix installer?
In my case i was converting arch to artix, but maybe the same problem can happend when chrooting ?
@jackghg Dinit can run in System mode with the following command (not as System-Manager):
dinit -s
This commands launch Dinit, but Dinit will no longer manage things like reboot, shutdown, then you can use it with the dinitctl command.
The only problem is that I don't know, this command mount dinit socket at /run/dinitctl or not? So I'm not sure this is the solution. (you can test it)
from dinit man page:
-s, --system Run as the system service manager. This is the default if invoked as the root user. This option affects the default service definition directory and control socket path. -m, --system-mgr Run as the system manager (perform operations directly related to machine startup and shutdown). This is the default when running as process ID 1. The main user-visible effect of this option is to invoke the shutdown program when a shutdown is requested (and after all services have stopped), and to provide some basic support for system recovery in case the boot service (or other specified service) cannot be started.
Note: for access to terminal after this command, you need add & to command: dinit -s &
Dinit can run
ok, tnx, ill test. however its a bit complex workaround... like make the symlink is easyer... (but dirtyer maybe)
Dinit can run
ok, tnx, ill test. however its a bit complex workaround... like make the symlink is easyer... (but dirtyer maybe)
It might sound "complicated", but it's really simple:
- Start the dinit daemon via
dinit -s &command - Work normally with the
dinitctlcommand - Finally, close the dinit daemon via
dinitctl shutdowncommand.
Done! It should be almost like this.
Of course, doing some things (such as enabling services) is easier to do manually But it doesn't work to start or stop the service.
I will implement a flag to allow use of dinitctl enable when dinit isn't running at some point.
Is this what u want it to do or what it does today ? because for me it doesnt enable the service, just give an error messagge.
That's what it does when dinit is running (as well as informing dinit of the changing dependency). When dinit is not running it will give an error as you say, but I will look at allowing this at some point (via a command-line switch).
@mobin-2008 it worked... but i still want this feature :)
I'm jackghg, this is my new account.
@davmac314 I think it should be closed.
you did it ?
Addressed in 788d65ff99b991284b3f782eabf5c7dc5145474d
u r amazing thanks!