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

"index out of bounds: the len is 2 but the index is 2" on older systemctl #27

Open
FinitelyFailed opened this issue Mar 18, 2024 · 0 comments

Comments

@FinitelyFailed
Copy link

Hi,

I'm using this crate on a device running Linux (Yocto Dunfel), which run systemctl 244.
Where "systemctl list-unit-files" gives me:

UNIT FILE                              STATE          
-.mount                                generated      
boot.mount                             generated      
data.mount                             generated      
dev-hugepages.mount                    static         
dev-mqueue.mount                       static         
sys-fs-fuse-connections.mount          static         
sys-kernel-config.mount                static         
sys-kernel-debug.mount                 static         
tmp.mount                              static         
var-volatile.mount                     generated      
systemd-ask-password-console.path      static         
systemd-ask-password-wall.path         static         
alsa-restore.service                   static         
alsa-state.service                     static         
apmd.service                           static         
autovt@.service                        enabled             
bluetooth.service                      enabled        
bthelper@.service                      static         
busybox-klogd.service                  enabled        
busybox-syslog.service                 enabled        
console-getty.service                  disabled       
container-getty@.service               static         
containerd.service                     disabled       
crond.service                          enabled        
dbus-org.bluez.service                 enabled        
dbus-org.freedesktop.hostname1.service static         
dbus-org.freedesktop.locale1.service   static         
dbus-org.freedesktop.login1.service    static         
dbus-org.freedesktop.network1.service  enabled        
dbus-org.freedesktop.resolve1.service  enabled        
dbus-org.freedesktop.timedate1.service static         
dbus-org.freedesktop.timesync1.service enabled        
dbus.service                           static         
debug-shell.service                    disabled  

I.e. the third column "VENDOR PRESET" doesn't exist.

So when I run e.g. "systemctl::exists" in my code it panics.

It looks lite this line is the culprit.

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

1 participant