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
80eefebf
Commit
80eefebf
authored
Jan 03, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pkg: also rc.shutdown hook, better for ACPI shutdown
parent
a25633f1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
3 deletions
+18
-3
+POST_INSTALL
+POST_INSTALL
+10
-0
+PRE_DEINSTALL
+PRE_DEINSTALL
+5
-0
plist
plist
+1
-1
rc.halt
src/etc/rc.halt
+1
-1
rc.reboot
src/etc/rc.reboot
+1
-1
rc.shutdown
src/etc/rc.shutdown
+0
-0
No files found.
+POST_INSTALL
View file @
80eefebf
...
...
@@ -21,6 +21,16 @@ EOF
cat /etc/rc.bak >> /etc/rc
rm -f /etc/rc.bak
echo "Hooking into /etc/rc.shutdown"
cp /etc/rc.shutdown /etc/rc.shutdown.bak
cat > /etc/rc.shutdown <<EOF
#!/bin/sh
# OPNsense rc(8) hook was automatically installed:
if [ -f /usr/local/etc/rc.shutdown ]; then /usr/local/etc/rc.shutdown; exit 0; fi
EOF
cat /etc/rc.shutdown.bak >> /etc/rc.shutdown
rm -f /etc/rc.shutdown.bak
echo "Writing package metadata"
mkdir -p /usr/local/opnsense/version
if [ -f /usr/local/opnsense/version/opnsense ]; then
...
...
+PRE_DEINSTALL
View file @
80eefebf
...
...
@@ -13,3 +13,8 @@ echo "Unhooking from /etc/rc"
cp /etc/rc /etc/rc.bak
tail -n +4 /etc/rc.bak > /etc/rc
rm -f /etc/rc.bak
echo "Unhooking from /etc/rc.shutdown"
cp /etc/rc.shutdown /etc/rc.shutdown.bak
tail -n +4 /etc/rc.shutdown.bak > /etc/rc.shutdown
rm -f /etc/rc.shutdown.bak
plist
View file @
80eefebf
...
...
@@ -98,7 +98,6 @@
/usr/local/etc/rc.firmware
/usr/local/etc/rc.firmware.subr
/usr/local/etc/rc.halt
/usr/local/etc/rc.halt.subr
/usr/local/etc/rc.initial
/usr/local/etc/rc.initial.banner
/usr/local/etc/rc.initial.defaults
...
...
@@ -137,6 +136,7 @@
/usr/local/etc/rc.reload_interfaces
/usr/local/etc/rc.resolv_conf_generate
/usr/local/etc/rc.restart_webgui
/usr/local/etc/rc.shutdown
/usr/local/etc/rc.sshd
/usr/local/etc/rc.syshook
/usr/local/etc/rc.update_alias_url_data
...
...
src/etc/rc.halt
View file @
80eefebf
#!/bin/sh
.
/usr/local/etc/rc.
halt.subr
.
/usr/local/etc/rc.
shutdown
/sbin/shutdown
-op
now
src/etc/rc.reboot
View file @
80eefebf
#!/bin/sh
.
/usr/local/etc/rc.
halt.subr
.
/usr/local/etc/rc.
shutdown
/sbin/shutdown
-or
now
src/etc/rc.
halt.subr
→
src/etc/rc.
shutdown
View file @
80eefebf
File moved
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