mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 06:31:18 +02:00
Change the replacement dpkg to respect comment lines in package.whitelist
Review URL: http://codereview.chromium.org/543099
This commit is contained in:
parent
3a704ffee4
commit
6a76c4d9b4
@ -53,7 +53,8 @@ is_whitelisted() {
|
|||||||
test -f "$whitelist" || return
|
test -f "$whitelist" || return
|
||||||
|
|
||||||
local checksum=$(md5sum "$1" | awk '{ print $1 }')
|
local checksum=$(md5sum "$1" | awk '{ print $1 }')
|
||||||
local count=$(grep -c "$checksum" "${whitelist}" || /bin/true)
|
local count=$(sed -e "s/#.*$//" "${whitelist}" | grep -c "$checksum" \
|
||||||
|
|| /bin/true)
|
||||||
test $count -ne 0
|
test $count -ne 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user