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
897b2c96
Commit
897b2c96
authored
Nov 10, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: add changelog fetch script for #341
parent
7116568b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
10 deletions
+63
-10
+POST_INSTALL
+POST_INSTALL
+1
-2
.gitignore
.gitignore
+9
-8
changelog.sh
src/opnsense/scripts/firmware/changelog.sh
+51
-0
check.sh
src/opnsense/scripts/firmware/check.sh
+2
-0
No files found.
+POST_INSTALL
View file @
897b2c96
...
@@ -21,12 +21,11 @@ EOF
...
@@ -21,12 +21,11 @@ EOF
cat /etc/rc.bak >> /etc/rc
cat /etc/rc.bak >> /etc/rc
rm -f /etc/rc.bak
rm -f /etc/rc.bak
echo "Writing package
version
"
echo "Writing package
metadata
"
mkdir -p /usr/local/opnsense/version
mkdir -p /usr/local/opnsense/version
if [ -f /usr/local/opnsense/version/opnsense ]; then
if [ -f /usr/local/opnsense/version/opnsense ]; then
mv /usr/local/opnsense/version/opnsense /usr/local/opnsense/version/opnsense.last
mv /usr/local/opnsense/version/opnsense /usr/local/opnsense/version/opnsense.last
fi
fi
echo "%%CORE_COMMIT%%" > /usr/local/opnsense/version/opnsense
echo "%%CORE_COMMIT%%" > /usr/local/opnsense/version/opnsense
echo "%%CORE_NAME%%" > /usr/local/opnsense/version/opnsense.name
echo "%%CORE_NAME%%" > /usr/local/opnsense/version/opnsense.name
echo "%%CORE_ABI%%" > /usr/local/opnsense/version/opnsense.abi
echo "%%CORE_ABI%%" > /usr/local/opnsense/version/opnsense.abi
...
...
.gitignore
View file @
897b2c96
/src/etc/pkg.conf
/src/etc/pkg/**
/src/etc/ssh/**
/src/etc/php/**
/src/etc/php.ini
/src/lib/**
*.DS_Store
*.DS_Store
*.codekit
*.codekit
*.mo
*.pyc
*.sass-cache
*.sass-cache
*.volt.php
*.volt.php
*.pyc
/src/etc/php.ini
*.mo
/src/etc/php/**
/src/etc/pkg.conf
/src/etc/pkg/**
/src/etc/ssh/**
/src/lib/**
/src/opnsense/changelog
src/opnsense/scripts/firmware/changelog.sh
0 → 100755
View file @
897b2c96
#!/bin/sh
# Copyright (c) 2016 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
set
-e
CORE_ABI
=
$(
cat
/usr/local/opnsense/version/opnsense.abi 2> /dev/null
)
SYS_ABI
=
$(
opnsense-verify
-a
2> /dev/null
)
URL
=
"https://pkg.opnsense.org"
URL
=
"
${
URL
}
/
${
SYS_ABI
}
/
${
CORE_ABI
}
"
URL
=
"
${
URL
}
/sets/changelog.txz"
DESTDIR
=
"/usr/local/opnsense/changelog"
WORKDIR
=
"/tmp/changelog"
FETCH
=
"fetch -aqT 30"
rm
-rf
${
WORKDIR
}
mkdir
-p
${
WORKDIR
}
${
FETCH
}
-o
${
WORKDIR
}
/changelog.txz.sig
"
${
URL
}
.sig"
${
FETCH
}
-o
${
WORKDIR
}
/changelog.txz
"
${
URL
}
"
opnsense-verify
-q
${
WORKDIR
}
/changelog.txz
mkdir
-p
${
DESTDIR
}
rm
${
DESTDIR
}
/
*
tar
-C
${
DESTDIR
}
-xJf
${
WORKDIR
}
/changelog.txz
src/opnsense/scripts/firmware/check.sh
View file @
897b2c96
...
@@ -62,6 +62,8 @@ tmp_pkg_update_file="/tmp/pkg_updates.output"
...
@@ -62,6 +62,8 @@ tmp_pkg_update_file="/tmp/pkg_updates.output"
# Check if pkg is already runnig
# Check if pkg is already runnig
pkg_running
=
`
ps
-x
|
grep
"pkg "
|
grep
-v
"grep"
`
pkg_running
=
`
ps
-x
|
grep
"pkg "
|
grep
-v
"grep"
`
if
[
"
$pkg_running
"
==
""
]
;
then
if
[
"
$pkg_running
"
==
""
]
;
then
# load changelogs first
/usr/local/opnsense/scripts/firmware/changelog.sh
# start pkg update
# start pkg update
pkg update
-f
>
$tmp_pkg_update_file
&
pkg update
-f
>
$tmp_pkg_update_file
&
pkg_running
=
"started"
# Set running state to arbitrary value
pkg_running
=
"started"
# Set running state to arbitrary value
...
...
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