set "shopt -s nullglob" to avoid failing when folder /etc/hide-hardware-info.d

does not exist or is empty
This commit is contained in:
Patrick Schleizer 2019-10-17 06:10:29 -04:00
parent b05663c5f6
commit cfbd77040a
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -6,12 +6,16 @@
sysfs_whitelist=1
cpuinfo_whitelist=1
shopt -s nullglob
## Allows for disabling the whitelist.
for i in /etc/hide-hardware-info.d/*.conf
do
source "${i}"
done
exit
create_whitelist() {
if [ "${1}" = "sysfs" ]; then
whitelist_path="/sys"