645734c629
[explorer/os_version] Improve FreeBSD support.
...
It looks like uname -r is not the most reliable way to get the target patch
level for the target system.
For more information see:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251743
2020-12-12 12:15:17 +01:00
Darko Poljak
53b91adbd8
Fix shellcheck
2020-09-11 14:20:57 +02:00
Dennis Camera
6fed178529
[explorer/os_version] Convert Debian sid to version number.
...
Conversion of Debian sid to versions is done based on Debian codenames.
The version number is the version number of the final release - 0.01.
It is unknown if Debian < 4.0 has any sort of version information
available (apart from maybe checking base-files package version).
But I don't think any of these systems are still alive,
so I think going with 3.99 is fine for those.
2020-08-17 09:31:40 +02:00
Dennis Camera
b370b70ff4
[explorer/os] Fix OS detection for openSUSE
...
All distros with ID_LIKE suse should be treated as "suse".
My openSUSE Leap 15.1 installation has:
ID_LIKE="suse opensuse"
This patch doesn't require a strict "suse" value but only the word suse to be in
the list.
2020-08-02 22:50:06 +02:00
Dennis Camera
5dfc996feb
Fix global explorers for NetBSD
...
On NetBSD sysctl is at /sbin/sysctl, but the default PATH does not
contain /sbin.
2020-07-27 15:11:02 +02:00
Daniel Heule
6a611e556a
fix os explorer for sles15
2020-06-02 13:40:21 +02:00
8b790b0a54
[explorer/machine_type] Make shellcheck happy!
2020-05-18 16:47:20 +02:00
cf44c4a01b
[explorer/machine_type] Simplify Linux + basic OpenBSD support.
...
By abstracting away vendor-dependent pattern matching for the linux code, we can
re-use that and be reasonably sure about OpenBSD machines being virtualised when
we can identify the undelrying virtualisation technology.
It remains to be solved how to tell if an OpenBSD machine is physical; in that
case previous cdist behaviour ("unknown") remains.
For NetBSD something similar to OpenBSD could be done, with different sysctls:
hw.machine and hw.model wary of adding those without testing though, so for
NetBSD previous cdist behaviour ("unknown") remains.
https://netbsd.gw.com/cgi-bin/man-cgi?sysctl+7.i386+NetBSD-9.0
2020-05-18 16:35:50 +02:00
7ca2bfc14a
[explorer/machine_type] Add support for FreeBSD.
...
More research is needed for {Net,Open}BSD support.
Indentation is left as-is for the linux code as I intend to simplify it in a
future MR, this way the diff is minimal.
2020-05-18 16:00:23 +02:00
678df1ec8a
[explorers] Improve *BSD support.
...
cpu_cores and memory did lacked support for other BSDs.
2020-04-27 01:29:37 +02:00
Steven Armstrong
76d978d3d8
explorer/init: do not grep on non-existent init
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2020-04-10 10:51:17 +02:00
Dennis Camera
6db6dc4ac0
[explorer/disks] Add license header
2020-02-25 20:24:14 +01:00
Dennis Camera
1ef126e16f
[explorer/disks] Move xargs call to the bottom
2020-02-25 20:21:35 +01:00
Dennis Camera
d3bd2669ec
[explorer/disks] Support Linux without lsblk (fallback to sysfs)
2020-02-25 20:21:14 +01:00
Dennis Camera
c6aba8d189
[explorer/disks] Fix for NetBSD
...
When connecting over SSH and running /bin/sh, the PATH is missing sbin locations.
sysctl is located at /sbin/sysctl on NetBSD.
2020-02-23 22:59:41 +01:00
2a5309b413
Merge branch 'fix/init-explorer/busybox' into 'master'
...
[explorer/init] Support more init systems
See merge request ungleich-public/cdist!850
2020-02-23 09:18:51 +01:00
Dennis Camera
0d6bc8e8f8
[explorer/init] Make shellcheck happy
2020-02-20 23:34:19 +01:00
Dennis Camera
0d84c91b40
[explorer/init] Fix unique() for Solaris
2020-02-20 23:34:19 +01:00
Dennis Camera
364340c8d5
[explorer/init] Refactor and testing
2020-02-20 23:34:19 +01:00
Dennis Camera
d895bb0e87
[explorer/init] Clean up
2020-02-20 23:34:19 +01:00
Dennis Camera
21c9e3db18
[explorer/init] Support more init systems
2020-02-20 23:34:11 +01:00
28d3760e29
[cdist]Update os_version for alpine
2020-02-20 09:40:55 +01:00
Dennis Camera
984e0dc8c4
[explorer/os_release] Add fallbacks to /usr/lib/os-release and /var/run/os-release
2020-02-03 19:29:04 +01:00
Dennis Camera
4fe2dcba89
[explorer/init] Linux is a mess...
2020-01-30 18:35:50 +01:00
Dennis Camera
de1a421b68
[explorer/init] Support for Darwin and more BusyBox combinations
2020-01-30 18:04:00 +01:00
Dennis Camera
fbe9fc4204
Merge branch 'master' into hostname
2019-10-27 20:15:03 +01:00
Dennis Camera
1bab641c94
[explorer/hostname] Do not shorten hostname in any case
2019-10-05 18:43:06 +02:00
Dennis Camera
f5342e9a35
[explorer/hostname] Remove code reading persistent hostname
2019-10-04 20:05:01 +02:00
9a172b62cb
Merge branch 'unquote-os-release' into 'master'
...
[explorer/os] Unquote values from /etc/os-release
See merge request ungleich-public/cdist!803
2019-10-03 20:32:28 +02:00
Dennis Camera
81ba849af8
Move __hostname hostname explorer to global scope
2019-10-03 19:19:06 +02:00
Dennis Camera
fba14496e7
[explorer/os] Unquote values from os-release file
2019-10-03 18:30:52 +02:00
Dennis Camera
55f8036377
[explorer/interfaces] Always sort output
...
Before, only the output of ifconfig was sorted.
2019-10-02 18:10:37 +02:00
Darko Poljak
281691cfd9
Merge pull request #772 from sideeffect42/openbsd-init
...
explorer/init: Add support for OpenBSD
2019-04-24 12:17:11 +02:00
Takashi Yoshi
6dd5278ade
[explorer/init] Add support for OpenBSD
2019-04-24 11:29:24 +02:00
Darko Poljak
5314f514c5
Print empty disk list for unsupported OS
2019-04-22 09:12:20 +02:00
Darko Poljak
b5bdb54b7f
Currently support only Linux, FreeBSD, OpenBSD, NetBSD
...
Make no assumptions, but rather output that system is unsupported
and ask the user to add support for it.
2019-04-20 13:08:22 +02:00
ab3544d5e8
global interfaces explorer: only check if we have ip or ifconfig and be more compatible.
...
tests on debian, centos, freebsd, openbsd, netbsd and solaris confirm that this is enough and extra os check is not needed here.
2019-04-20 02:05:32 +03:00
Nico Schottelius
aba1ae68f0
[explorer] disks: use echo instead of find as fallback
...
Fixes #761
2019-04-17 20:50:39 +02:00
Ander Punnar
1c152f0acb
fix disks explorer ( #753 )
...
* fix disks explorer
* fix SC2230
* exclude floppies
* update comment about excluded floppies
* add link to linux documentation about device majors
* try to support netbsd
* update possible netbsd disk devices
2019-04-12 20:41:05 +02:00
Daniel Néri
dbcf7d5543
explorer/disks: Add support for OpenBSD
2019-03-19 23:13:24 +01:00
Daniel Néri
0fc64a951c
explorer/cpu_cores: Add support for OpenBSD
2019-03-19 23:09:01 +01:00
Darko Poljak
83806e767a
Disable SC1091 where appropriate.
2018-10-07 10:22:11 +02:00
Darko Poljak
0cb127822f
Merge pull request #706 from darko-poljak/SC2164
...
Fix SC2164
2018-10-05 10:28:04 +02:00
Darko Poljak
49bb041330
Merge pull request #696 from thriqon/shellcheck-party-SC2086
...
Fix SC2086 on all scripts
2018-10-05 10:26:53 +02:00
Darko Poljak
c01cf38660
Fix SC2164
2018-10-04 23:10:42 +02:00
Jonas Weber
a6fdf4255a
Fix SC2069 (wrong stdout/stderr redirect order)
...
In the original order, stderr was connected to the old stdout
(terminal). This was _probably_ not intended. The new order fixes this
by first connecting stdout to /dev/null and then attaching stderr to
that as well.
2018-10-04 22:04:24 +02:00
Jonas Weber
ae7ccc5995
Fix SC2086 on all scripts
...
Relevant documentation: https://github.com/koalaman/shellcheck/wiki/SC2086
relates to: #540
This commit addresses 241 separate cases of missing quotes around
variables.
2018-10-04 19:45:22 +02:00
085b2a2b10
remove set -e
on explorers (they should be able to fail gracefully)
2018-10-04 17:38:39 +02:00
a46da35bbc
fix SC2148 (missing shebang) and make executable
2018-10-04 17:38:38 +02:00
134c84607f
fix another SC2166 (test [ .. -a.. ]
replaced by [ .. ] && ]
)
2018-10-04 12:28:59 +02:00