ldap.sh : Fix computerOS and add case for HardwareSerial if computer is a VM
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
d956d5c6ba
commit
829df74567
|
@ -6,8 +6,9 @@ HardwareMark=$(sysctl hw.vendor| sed 's#hw.vendor=##')
|
||||||
HardwareModel=$(sysctl hw.product| sed 's#hw.product=##')
|
HardwareModel=$(sysctl hw.product| sed 's#hw.product=##')
|
||||||
computerIP=$(ifconfig egress | grep inet | awk -v OFS="\n" '{ print $2, $NF }'| head -1)
|
computerIP=$(ifconfig egress | grep inet | awk -v OFS="\n" '{ print $2, $NF }'| head -1)
|
||||||
computerKernel=$(sysctl kern.osrelease | sed 's#kern.osrelease=##')
|
computerKernel=$(sysctl kern.osrelease | sed 's#kern.osrelease=##')
|
||||||
computerOS=OpenBSD $computerKernel
|
computerOS="OpenBSD $computerKernel"
|
||||||
HardwareSerial=$(sysctl hw.serialno| sed 's#hw.serialno=##')
|
HardwareSerial=$(sysctl hw.serialno 2>/dev/null | sed 's#hw.serialno=##')
|
||||||
|
if [ -z $HardwareSerial ]; then sysctl hw | grep -qi qemu && HardwareSerial="Not Specified"; fi
|
||||||
clientNumber="XXX"
|
clientNumber="XXX"
|
||||||
cpuMark=$(sysctl hw.model| sed 's#hw.model=##')
|
cpuMark=$(sysctl hw.model| sed 's#hw.model=##')
|
||||||
cpuModel=$(sysctl hw.model| sed 's#hw.model=##')
|
cpuModel=$(sysctl hw.model| sed 's#hw.model=##')
|
||||||
|
|
Loading…
Reference in a new issue