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
9833d24a
Commit
9833d24a
authored
Feb 25, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pkg: bring in package scripts to make their modification easier
parent
e6bc4237
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
+POST_INSTALL
pkg/+POST_INSTALL
+24
-0
+PRE_DEINSTALL
pkg/+PRE_DEINSTALL
+19
-0
No files found.
pkg/+POST_INSTALL
0 → 100644
View file @
9833d24a
echo "Updating /etc/shells"
cp /etc/shells /etc/shells.bak
(grep -v /usr/local/etc/rc.initial /etc/shells.bak; \
echo /usr/local/etc/rc.initial) > /etc/shells
rm -f /etc/shells.bak
echo "Registering root shell"
pw usermod -n root -s /usr/local/etc/rc.initial
echo "Disabling FreeBSD mirror"
sed -i "" -e "s/^ enabled: yes$/ enabled: no/" /etc/pkg/FreeBSD.conf
echo "Hooking into /etc/rc"
cp /etc/rc /etc/rc.bak
cat > /etc/rc <<EOG
#!/bin/sh
# OPNsense rc(8) hook was automatically installed:
if [ -f /usr/local/etc/rc ]; then /usr/local/etc/rc; exit 0; fi
EOG
cat /etc/rc.bak >> /etc/rc
rm -f /etc/rc.bak
echo "Writing OPNsense version"
echo "${REPO_VERSION}-${REPO_COMMENT}" > /usr/local/etc/version
pkg/+PRE_DEINSTALL
0 → 100644
View file @
9833d24a
echo "Resetting root shell"
pw usermod -n root -s /bin/csh
echo "Updating /etc/shells"
cp /etc/shells /etc/shells.bak
(grep -v /usr/local/etc/rc.initial /etc/shells.bak) > /etc/shells
rm -f /etc/shells.bak
echo "Unhooking from /etc/rc"
cp /etc/rc /etc/rc.bak
LINES=\$(cat /etc/rc | wc -l)
tail -n \$(expr \${LINES} - 3) /etc/rc.bak > /etc/rc
rm -f /etc/rc.bak
echo "Enabling FreeBSD mirror"
sed -i "" -e "s/^ enabled: no$/ enabled: yes/" /etc/pkg/FreeBSD.conf
echo "Removing OPNsense version"
rm -f /usr/local/etc/version
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