mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
users: support OpenBS using utmp
OpenBSD uses the original utmp file format so the general `users` does not work there. By using the `utmp-classic` lib, we cna process the current users on the system from the /var/run/utmp and show the list. fixes #5665
This commit is contained in:
parent
92665144c9
commit
576341bb93
9 changed files with 123 additions and 90 deletions
|
@ -31,3 +31,12 @@ fn test_users_check_name() {
|
|||
|
||||
new_ucmd!().succeeds().stdout_is(&expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(target_os = "openbsd")]
|
||||
fn test_users_check_name_openbsd() {
|
||||
new_ucmd!()
|
||||
.args(&["openbsd_utmp"])
|
||||
.run()
|
||||
.stdout_contains("test");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue