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
efea84d9
Commit
efea84d9
authored
Jun 08, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firmware: fold package updates into opnsense-update(8)
parent
cd831222
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
17 deletions
+12
-17
rc.initial.firmware
src/etc/rc.initial.firmware
+5
-8
pkg_upgrade.sh
src/opnsense/scripts/pkg_upgrade.sh
+7
-9
No files found.
src/etc/rc.initial.firmware
View file @
efea84d9
...
@@ -42,9 +42,7 @@ esac
...
@@ -42,9 +42,7 @@ esac
echo
echo
# upgrade all packages if possible
# upgrade all packages if possible
pkg upgrade
-y
opnsense-update
-p
pkg autoremove
-y
pkg clean
-y
echo
echo
...
@@ -54,8 +52,7 @@ echo
...
@@ -54,8 +52,7 @@ echo
echo
echo
# if we can update base, we'll do that as well
# if we can update base, we'll do that as well
if
opnsense-update
-c
;
then
REBOOT
=
opnsense-update
&&
/usr/local/etc/rc.reboot
opnsense-update
-c
-bk
&&
REBOOT
=
1
else
opnsense-update
-bk
opnsense-update
[
-n
"
${
REBOOT
}
"
]
/usr/local/etc/rc.reboot
fi
src/opnsense/scripts/pkg_upgrade.sh
View file @
efea84d9
...
@@ -40,18 +40,16 @@ if [ -z "$pkg_running" ]; then
...
@@ -40,18 +40,16 @@ if [ -z "$pkg_running" ]; then
echo
'***STARTING UPGRADE***'
>>
${
PKG_PROGRESS_FILE
}
echo
'***STARTING UPGRADE***'
>>
${
PKG_PROGRESS_FILE
}
if
[
"
$package
"
==
"all"
]
;
then
if
[
"
$package
"
==
"all"
]
;
then
# update all installed packages
# update all installed packages
pkg upgrade
-y
>>
${
PKG_PROGRESS_FILE
}
opnsense-update
-p
>>
${
PKG_PROGRESS_FILE
}
pkg autoremove
-y
>>
${
PKG_PROGRESS_FILE
}
pkg clean
-y
>>
${
PKG_PROGRESS_FILE
}
# restart the web server
# restart the web server
/usr/local/etc/rc.restart_webgui
>>
${
PKG_PROGRESS_FILE
}
/usr/local/etc/rc.restart_webgui
>>
${
PKG_PROGRESS_FILE
}
# if we can update base, we'll do that as well
# if we can update base, we'll do that as well
if
opnsense-update
-c
;
then
if
opnsense-update
-c
-bk
;
then
echo
"!!!!!!!!!!!! ATTENTION !!!!!!!!!!!"
>>
${
PKG_PROGRESS_FILE
}
echo
"!!!!!!!!!!!! ATTENTION !!!!!!!!!!!
!!!
"
>>
${
PKG_PROGRESS_FILE
}
echo
"A kernel/base upgrade is
required
."
>>
${
PKG_PROGRESS_FILE
}
echo
"A kernel/base upgrade is
in progress
."
>>
${
PKG_PROGRESS_FILE
}
echo
"
try to perform immediately
"
>>
${
PKG_PROGRESS_FILE
}
echo
"
Please do not turn off the system.
"
>>
${
PKG_PROGRESS_FILE
}
echo
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
>>
${
PKG_PROGRESS_FILE
}
echo
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!
"
>>
${
PKG_PROGRESS_FILE
}
if
opnsense-update
>>
${
PKG_PROGRESS_FILE
}
;
then
if
opnsense-update
-bk
>>
${
PKG_PROGRESS_FILE
}
;
then
REBOOT
=
1
REBOOT
=
1
fi
fi
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