1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/root/target/linux/ipq40xx/base-files/bin/ipk-sig.sh

18 lines
326 B
Bash
Raw Normal View History

2022-03-07 19:21:35 +00:00
#!/bin/sh
sig="/tmp/.$(cat /proc/sys/kernel/random/uuid).sig"
check() {
local ipk="$1"
[ -z "$ipk" ] && return 1
tar -xzOf "$ipk" ./control+data.sig > $sig || return 2
tar -xzOf "$ipk" ./control.tar.gz ./data.tar.gz | usign -V -m - -P /etc/opkg/keys -x $sig || return 3
}
check $1
status=$?
rm -f $sig
return $status