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
e6fa852e
Commit
e6fa852e
authored
Oct 11, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firmware: piped status return was wrong
parent
f7ffa6e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
rc.firmware.subr
src/etc/rc.firmware.subr
+11
-4
No files found.
src/etc/rc.firmware.subr
View file @
e6fa852e
...
...
@@ -28,22 +28,28 @@
set
-e
LOCKFILE
=
"/tmp/pkg_upgrade.progress"
PIPEFILE
=
"/tmp/pkg_upgrade.pipe"
TEE
=
"/usr/bin/tee -a"
:
>
${
LOCKFILE
}
rm
-f
${
PIPEFILE
}
mkfifo
${
PIPEFILE
}
echo
"***GOT REQUEST TO UPGRADE***"
>>
${
LOCKFILE
}
if
[
-z
"
${
1
}
"
]
;
then
# upgrade all packages if possible
opnsense-update
-p
2>&1 |
${
TEE
}
${
LOCKFILE
}
${
TEE
}
${
LOCKFILE
}
<
${
PIPEFILE
}
&
opnsense-update
-p
2>&1
>
${
PIPEFILE
}
# trigger a webgui restart to cope with changes
/usr/local/etc/rc.restart_webgui 2>&1 |
${
TEE
}
${
LOCKFILE
}
${
TEE
}
${
LOCKFILE
}
<
${
PIPEFILE
}
&
/usr/local/etc/rc.restart_webgui 2>&1
>
${
PIPEFILE
}
# if we can update base, we'll do that as well
if
opnsense-update
-c
;
then
if
opnsense-update
-bk
2>&1 |
${
TEE
}
${
LOCKFILE
}
;
then
${
TEE
}
${
LOCKFILE
}
<
${
PIPEFILE
}
&
if
opnsense-update
-bk
2>&1
>
${
PIPEFILE
}
;
then
echo
'***REBOOT***'
>>
${
LOCKFILE
}
sleep
5
/usr/local/etc/rc.reboot
...
...
@@ -51,7 +57,8 @@ if [ -z "${1}" ]; then
fi
elif
[
"
${
1
}
"
=
"upgrade"
-a
-n
"
${
2
}
"
]
;
then
# upgrade to a major release
if
opnsense-update
-ur
${
2
}
2>&1 |
${
TEE
}
${
LOCKFILE
}
;
then
${
TEE
}
${
LOCKFILE
}
<
${
PIPEFILE
}
&
if
opnsense-update
-ur
${
2
}
2>&1
>
${
PIPEFILE
}
;
then
echo
'***REBOOT***'
>>
${
LOCKFILE
}
sleep
5
/usr/local/etc/rc.reboot
...
...
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