mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
firmware: allow to run audits from firmware upgrade console option #4500
Type "s" for security audit, or "h" for health audit. We don't add it to the option prompt to not clutter the menu flow. This is mostly for debug and development purposes.
This commit is contained in:
parent
7d5b8bc24e
commit
d91e308001
@ -234,8 +234,7 @@ EOF
|
||||
|
||||
echo "***GOT REQUEST TO AUDIT HEALTH***" >> ${LOCKFILE}
|
||||
|
||||
${TEE} ${LOCKFILE} < ${PIPEFILE} &
|
||||
echo "Currently running $(opnsense-version) at $(date)" > ${PIPEFILE}
|
||||
echo "Currently running $(opnsense-version) at $(date)" >> ${LOCKFILE}
|
||||
|
||||
set_check kernel
|
||||
set_check base
|
||||
|
||||
@ -33,8 +33,7 @@ rm -f ${PIPEFILE}
|
||||
mkfifo ${PIPEFILE}
|
||||
|
||||
echo "***GOT REQUEST TO AUDIT SECURITY***" >> ${LOCKFILE}
|
||||
${TEE} ${LOCKFILE} < ${PIPEFILE} &
|
||||
echo "Currently running $(opnsense-version) at $(date)" > ${PIPEFILE}
|
||||
echo "Currently running $(opnsense-version) at $(date)" >> ${LOCKFILE}
|
||||
${TEE} ${LOCKFILE} < ${PIPEFILE} &
|
||||
pkg audit -F > ${PIPEFILE} 2>&1
|
||||
sleep 1 # give the system time to flush the buffer to console
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright (c) 2015-2019 Franco Fichtner <franco@opnsense.org>
|
||||
# Copyright (c) 2015-2021 Franco Fichtner <franco@opnsense.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@ -69,6 +69,20 @@ case ${YN} in
|
||||
${NAME})
|
||||
ARGS="upgrade ${NAME}"
|
||||
;;
|
||||
[sS])
|
||||
echo
|
||||
/usr/local/opnsense/scripts/firmware/launcher.sh security
|
||||
echo
|
||||
read -p "Press any key to return to menu." WAIT
|
||||
exit 0
|
||||
;;
|
||||
[hH])
|
||||
echo
|
||||
/usr/local/opnsense/scripts/firmware/launcher.sh health
|
||||
echo
|
||||
read -p "Press any key to return to menu." WAIT
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user