Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
87
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Switch - Software
Commits
17b8297e
Commit
17b8297e
authored
4 years ago
by
Alessandro Rubini
Browse files
Options
Downloads
Patches
Plain Diff
userspace: start radiusvlan at boot, after vlans are set up
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
746d2080
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
userspace/rootfs_override/etc/init.d/radiusvlan.sh
+73
-0
73 additions, 0 deletions
userspace/rootfs_override/etc/init.d/radiusvlan.sh
userspace/rootfs_override/etc/rcS/S65rvlan.sh
+1
-0
1 addition, 0 deletions
userspace/rootfs_override/etc/rcS/S65rvlan.sh
with
74 additions
and
0 deletions
userspace/rootfs_override/etc/init.d/radiusvlan.sh
0 → 100755
+
73
−
0
View file @
17b8297e
#!/bin/sh
dotconfig
=
/wr/etc/dot-config
start
()
{
if
[
-f
$dotconfig
]
;
then
.
$dotconfig
else
echo
"
$0
unable to source dot-config (
$dotconfig
)!"
fi
if
[
"
$CONFIG_RVLAN_DAEMON
"
=
"n"
]
;
then
echo
"Radius-VLAN: disabled
\n
"
return
fi
echo
-n
"Starting Radius-VLAN daemon: "
WRS_LOG
=
$CONFIG_WRS_LOG_OTHER
# if empty turn it to /dev/null
if
[
-z
$WRS_LOG
]
;
then
WRS_LOG
=
"/dev/null"
;
fi
# if a pathname, use it
if
echo
"
$WRS_LOG
"
|
grep
/
>
/dev/null
;
then
eval
LOGPIPE
=
\"
\>
$WRS_LOG
2
\>\&
1
\"
;
elif
[
"
$WRS_LOG
"
==
"default_syslog"
]
;
then
eval
LOGPIPE
=
\"
2
\>\&
1
\|
logger
-t
rvlan
-p
daemon.info
\"
else
# not a pathname: use verbatim
eval
LOGPIPE
=
\"
2
\>\&
1
\|
logger
-t
rvlan
-p
$WRS_LOG
\"
fi
# pidof: no running script should have the same name as this process
if
pidof radiusvlan
>
/dev/null
;
then
echo
"Failed (already running?)"
else
eval
/wr/bin/radiusvlan
$LOGPIPE
\&
echo
"OK"
fi
}
stop
()
{
echo
-n
"Stopping Radius-VLAN "
start-stop-daemon
-K
-q
--exec
/wr/bin/radiusvlan
if
[
$?
-eq
0
]
;
then
echo
"OK"
else
echo
"Failed"
fi
}
restart
()
{
stop
start
}
case
"
$1
"
in
start
)
start
;;
stop
)
stop
;;
restart|reload
)
restart
;;
*
)
echo
$"Usage:
$0
{start|stop|restart}"
exit
1
;;
esac
This diff is collapsed.
Click to expand it.
userspace/rootfs_override/etc/rcS/S65rvlan.sh
0 → 120000
+
1
−
0
View file @
17b8297e
../init.d/radiusvlan.sh
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment