mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-07-14 01:42:01 +07:00
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:
@ -6,12 +6,16 @@
|
|||||||
sysfs_whitelist=1
|
sysfs_whitelist=1
|
||||||
cpuinfo_whitelist=1
|
cpuinfo_whitelist=1
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
## Allows for disabling the whitelist.
|
## Allows for disabling the whitelist.
|
||||||
for i in /etc/hide-hardware-info.d/*.conf
|
for i in /etc/hide-hardware-info.d/*.conf
|
||||||
do
|
do
|
||||||
source "${i}"
|
source "${i}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
exit
|
||||||
|
|
||||||
create_whitelist() {
|
create_whitelist() {
|
||||||
if [ "${1}" = "sysfs" ]; then
|
if [ "${1}" = "sysfs" ]; then
|
||||||
whitelist_path="/sys"
|
whitelist_path="/sys"
|
||||||
|
Reference in New Issue
Block a user