mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-15 04:42:02 +00:00
17 lines
326 B
Bash
Executable file
17 lines
326 B
Bash
Executable file
#!/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
|