Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
4038f78e
Commit
4038f78e
authored
Apr 27, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firmware: merge os/product version advertise from master
parent
a2bef0ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
check.sh
src/opnsense/scripts/firmware/check.sh
+7
-4
No files found.
src/opnsense/scripts/firmware/check.sh
View file @
4038f78e
#!/bin/sh
#!/bin/sh
# Copyright (C) 2015 Franco Fichtner <franco@opnsense.org>
# Copyright (C) 2015
-2016
Franco Fichtner <franco@opnsense.org>
# Copyright (C) 2014 Deciso B.V.
# Copyright (C) 2014 Deciso B.V.
# All rights reserved.
# All rights reserved.
#
#
...
@@ -222,8 +222,11 @@ if [ "$pkg_running" == "" ]; then
...
@@ -222,8 +222,11 @@ if [ "$pkg_running" == "" ]; then
killall pkg
killall pkg
fi
fi
fi
fi
# Get date/timestamp
last_check
=
`
date
`
product_version
=
$(
cat
/usr/local/opnsense/version/opnsense
)
os_version
=
$(
uname
-sr
)
last_check
=
$(
date
)
# Write our json structure to disk
# Write our json structure to disk
echo
"{
\"
connection
\"
:
\"
$connection
\"
,
\"
repository
\"
:
\"
$repository
\"
,
\"
last_check
\"
:
\"
$last_check
\"
,
\"
updates
\"
:
\"
$updates
\"
,
\"
download_size
\"
:
\"
$download_size
\"
,
\"
extra_space_required
\"
:
\"
$required_space
\"
,
\"
new_packages
\"
:[
$packages_new
],
\"
reinstall_packages
\"
:[
$packages_reinstall
],
\"
upgrade_packages
\"
:[
$packages_upgraded
],
\"
upgrade_needs_reboot
\"
:
\"
$upgrade_needs_reboot
\"
}"
echo
"{
\"
connection
\"
:
\"
$connection
\"
,
\"
repository
\"
:
\"
$repository
\"
,
\"
product_version
\"
:
\"
$product_version
\"
,
\"
os_version
\"
:
\"
$os_version
\"
,
\"
last_check
\"
:
\"
$last_check
\"
,
\"
updates
\"
:
\"
$updates
\"
,
\"
download_size
\"
:
\"
$download_size
\"
,
\"
extra_space_required
\"
:
\"
$required_space
\"
,
\"
new_packages
\"
:[
$packages_new
],
\"
reinstall_packages
\"
:[
$packages_reinstall
],
\"
upgrade_packages
\"
:[
$packages_upgraded
],
\"
upgrade_needs_reboot
\"
:
\"
$upgrade_needs_reboot
\"
}"
fi
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment