6 echo 'Usage: audit-packages [-deqsVv] [-c config_file] [-F file]' >& $2
7 echo ' [-g file] [-h file]' >& $2
8 echo ' [-K pkg_dbdir] [-n package] [-p package]' >& $2
9 echo ' [-Q varname] [-t type]' >& $2
10 echo "Please use the audit, audit-pkg, audit-batch and fetch-pkg-vulnerabilities" >& $2
11 echo "commands of pkg_admin instead." >& $2
28 args
=`getopt F:K:Q:Vc:deg:h:n:p:qst:v $*`
35 while [ $# -gt 0 ]; do
53 echo "The audit-packages wrapper does not support -c" >&2
54 echo "Please use the audit, audit-pkg, audit-batch and fetch-pkg-vulnerabilities" >& 2
55 echo "commands of pkg_admin instead." >& 2
65 echo "The audit-packages wrapper does not support -g" >&2
66 echo "Please switch to \`\`pkg_admin fetch-pkg-vulnerabilities''." >&2
92 do_verbose
="$do_verbose -v"
98 if [ -n "${do_fetch}" ]; then
99 exec ${pkg_admin} ${do_pkgdb} fetch-pkg-vulnerabilities ${do_sign}
102 if [ -n "${do_check_vul_file}" ]; then
103 exec ${pkg_admin} ${do_pkgdb} check-pkg-vulnerabilities ${do_sign} "${do_check_vul_file}"
106 if [ -n "${do_print_var}" ]; then
107 exec ${pkg_admin} ${do_pkgdb} config-var "${do_print_var}"
110 if [ -n "${do_check_file}" ]; then
111 if [ -n "${do_check_pattern}" -o -n "${do_check_installed}" ]; then
112 echo "Only one of -F, -n or -p is interpreted at a time." >& 2
115 exec ${pkg_admin} ${do_pkgdb} ${do_verbose} ${do_quiet} audit-pkg \
116 ${do_eol} ${do_limit_type} ${do_check_file}
119 if [ -n "${do_check_pattern}" ]; then
120 if [ -n "${do_check_installed}" ]; then
121 echo "Only one of -F, -n or -p is interpreted at a time." >& 2
124 exec ${pkg_admin} ${do_pkgdb} ${do_verbose} ${do_quiet} audit-pkg \
125 ${do_eol} ${do_limit_type} ${do_check_pattern}
128 # If do_check_installed is empty, all packages are checked.
129 exec ${pkg_admin} ${do_pkgdb} ${do_verbose} ${do_quiet} audit \
130 ${do_eol} ${do_limit_type} ${do_check_installed}