Initial commit
This commit is contained in:
9
package/system/opkg/files/20_migrate-feeds
Normal file
9
package/system/opkg/files/20_migrate-feeds
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -f /etc/opkg.conf ] && grep -q "src\/" /etc/opkg.conf || exit 0
|
||||
|
||||
echo -e "# Old feeds from previous image\n# Uncomment to reenable\n" >> /etc/opkg/customfeeds.conf
|
||||
sed -n "s/.*\(src\/.*\)/# \1/p" /etc/opkg.conf >> /etc/opkg/customfeeds.conf
|
||||
sed -i "/.*src\/.*/d" /etc/opkg.conf
|
||||
|
||||
exit 0
|
||||
3
package/system/opkg/files/customfeeds.conf
Normal file
3
package/system/opkg/files/customfeeds.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
# add your custom package feeds here
|
||||
#
|
||||
# src/gz example_feed_name http://www.example.com/path/to/files
|
||||
56
package/system/opkg/files/opkg-key
Executable file
56
package/system/opkg/files/opkg-key
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: $0 <command> <arguments...>
|
||||
Commands:
|
||||
add <file>: Add keyfile <file> to opkg trusted keys
|
||||
remove <file>: Remove keyfile matching <file> from opkg trusted keys
|
||||
verify <sigfile> <list>: Check list file <list> against signature file <sigfile>
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
opkg_key_verify() {
|
||||
local sigfile="$1"
|
||||
local msgfile="$2"
|
||||
|
||||
(
|
||||
zcat "$msgfile" 2>/dev/null ||
|
||||
cat "$msgfile" 2>/dev/null
|
||||
) | usign -V -P /etc/opkg/keys -q -x "$sigfile" -m -
|
||||
}
|
||||
|
||||
opkg_key_add() {
|
||||
local key="$1"
|
||||
[ -n "$key" ] || usage
|
||||
[ -f "$key" ] || echo "Cannot open file $1"
|
||||
local fingerprint="$(usign -F -p "$key")"
|
||||
mkdir -p "/etc/opkg/keys"
|
||||
cp "$key" "/etc/opkg/keys/$fingerprint"
|
||||
}
|
||||
|
||||
opkg_key_remove() {
|
||||
local key="$1"
|
||||
[ -n "$key" ] || usage
|
||||
[ -f "$key" ] || echo "Cannot open file $1"
|
||||
local fingerprint="$(usign -F -p "$key")"
|
||||
rm -f "/etc/opkg/keys/$fingerprint"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
add)
|
||||
shift
|
||||
opkg_key_add "$@"
|
||||
;;
|
||||
remove)
|
||||
shift
|
||||
opkg_key_remove "$@"
|
||||
;;
|
||||
verify)
|
||||
shift
|
||||
opkg_key_verify "$@"
|
||||
;;
|
||||
*) usage ;;
|
||||
esac
|
||||
6
package/system/opkg/files/opkg-smime.conf
Normal file
6
package/system/opkg/files/opkg-smime.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
dest root /
|
||||
dest ram /tmp
|
||||
lists_dir ext /var/opkg-lists
|
||||
option overlay_root /overlay
|
||||
option check_signature 1
|
||||
option signature_ca_file /etc/ssl/certs/opkg.pem
|
||||
4
package/system/opkg/files/opkg.conf
Normal file
4
package/system/opkg/files/opkg.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
dest root /
|
||||
dest ram /tmp
|
||||
lists_dir ext /var/opkg-lists
|
||||
option overlay_root /overlay
|
||||
Reference in New Issue
Block a user