Skip to content
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

Does not work on Arch linux #14

Open
RoastBeefer00 opened this issue May 20, 2023 · 3 comments
Open

Does not work on Arch linux #14

RoastBeefer00 opened this issue May 20, 2023 · 3 comments

Comments

@RoastBeefer00
Copy link

I am importing using use systemctl::*; and running the following code:

let services = list_units(None, None).unwrap();
println!("Services: {:?}", services);

and I get
Services: [] no matter what I do.

I validated that systemctl is in /usr/bin/systemctl and when I run the actual commands locally I do not have any problems. Am I missing something obvious here?

@gwbres
Copy link
Owner

gwbres commented May 20, 2023

Hello @RoastBeefer00,

I missing something obvious here?

does not look like it,

Can you show us one or two status being reported by systemctl list-unit-files ? It looks like the parser is in failure, but I doubt that would be the case for 100% of the system services

@RoastBeefer00
Copy link
Author

Here is an example of output from systemctl list-unit-files:

UNIT FILE                                  STATE           PRESET  
proc-sys-fs-binfmt_misc.automount          static          -       
-.mount                                    generated       -       
dev-hugepages.mount                        static          -       
dev-mqueue.mount                           static          -       
efi.mount                                  generated       -       
proc-fs-nfsd.mount                         static          -       
proc-sys-fs-binfmt_misc.mount              disabled        disabled
sys-fs-fuse-connections.mount              static          -       
sys-kernel-config.mount                    static          -       
sys-kernel-debug.mount                     static          -       
sys-kernel-tracing.mount                   static          -       
tmp.mount                                  generated       -       
var-lib-machines.mount                     static          -       
var-lib-nfs-rpc_pipefs.mount               static          -       
gpm.path                                   static          -       
systemd-ask-password-console.path          static          -       
systemd-ask-password-wall.path             static          -       
session-1.scope                            transient       -       
accounts-daemon.service                    disabled        disabled
alsa-restore.service                       static          -       
alsa-state.service                         static          -       
archlinux-keyring-wkd-sync.service         static          -       
arptables.service                          disabled        disabled
atop-rotate.service                        static          -       
atop.service                               disabled        disabled
atopacct.service                           disabled        disabled
atopgpu.service                            disabled        disabled
auditd.service                             disabled        disabled
auth-rpcgss-module.service                 static          -       
[email protected]                            alias           -       
avahi-daemon.service                       enabled         disabled
avahi-dnsconfd.service                     disabled        disabled
blk-availability.service                   disabled        disabled
bluetooth-mesh.service                     disabled        disabled
bluetooth.service                          disabled        disabled
[email protected]                       static          -       
canberra-system-bootup.service             disabled        disabled
canberra-system-shutdown-reboot.service    disabled        disabled
canberra-system-shutdown.service           disabled        disabled
console-getty.service                      disabled        disabled
[email protected]                   static          -       
containerd.service                         disabled        disabled
dbus-org.fedoraproject.FirewallD1.service  alias           -       
dbus-org.freedesktop.Avahi.service         alias           -       
dbus-org.freedesktop.hostname1.service     alias           -       
dbus-org.freedesktop.import1.service       alias           -       
dbus-org.freedesktop.locale1.service       alias           -       
dbus-org.freedesktop.login1.service        alias           -       
dbus-org.freedesktop.machine1.service      alias           -       
dbus-org.freedesktop.nm-dispatcher.service alias           -       
dbus-org.freedesktop.portable1.service     alias           -       
dbus-org.freedesktop.timedate1.service     alias           -       
dbus-org.freedesktop.timesync1.service     alias           -       

@alexkunde
Copy link
Contributor

@RoastBeefer00, I had the same problem on ubuntu, but its fixed for me with the newest commit in main. Can you retry?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants