Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
83
Issues
83
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
405bc8f3
Commit
405bc8f3
authored
Oct 17, 2012
by
Benoit Rat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rootfs: write service with start/stop/restart command
parent
af39b3af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
5 deletions
+48
-5
S60wr
userspace/rootfs_override/etc/init.d/S60wr
+34
-3
startup-mb.sh
userspace/rootfs_override/wr/sbin/startup-mb.sh
+1
-2
stop-mb.sh
userspace/rootfs_override/wr/sbin/stop-mb.sh
+13
-0
No files found.
userspace/rootfs_override/etc/init.d/S60wr
View file @
405bc8f3
#!/bin/sh
#!/bin/ash
#!/bin/bash
/wr/sbin/startup-mb.sh
start() {
\ No newline at end of file
echo -n "Starting WR minibackplane: "
/wr/sbin/startup-mb.sh
echo "OK"
}
stop() {
echo -n "Stopping WR minibackplane: "
/wr/sbin/stop-mb.sh
echo "OK"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
userspace/rootfs_override/wr/sbin/startup-mb.sh
View file @
405bc8f3
#!/bin/ash
#!/bin/ash
echo
"Starting up WR Switch (18-ports MiniBackplane version)..."
export
WR_HOME
=
"/wr"
export
WR_HOME
=
"/wr"
# Get parameter from kernel commandline
# Get parameter from kernel commandline
...
@@ -19,3 +17,4 @@ insmod $WR_HOME/lib/modules/wr_vic.ko
...
@@ -19,3 +17,4 @@ insmod $WR_HOME/lib/modules/wr_vic.ko
insmod
$WR_HOME
/lib/modules/wr-nic.ko
macaddr
=
$val
insmod
$WR_HOME
/lib/modules/wr-nic.ko
macaddr
=
$val
insmod
$WR_HOME
/lib/modules/wr_rtu.ko
insmod
$WR_HOME
/lib/modules/wr_rtu.ko
$WR_HOME
/sbin/start-daemons.sh
$WR_HOME
/sbin/start-daemons.sh
userspace/rootfs_override/wr/sbin/stop-mb.sh
0 → 100644
View file @
405bc8f3
#!/bin/ash
export
WR_HOME
=
"/wr"
echo
"Killing deamon"
killall wrsw_hal
killall wrsw_rtud
killall ptpd
echo
"Removing Kernel modules"
rmmod wr_rtu
rmmod wr-nic
rmmod wr_vic
rmmod at91_softpwm
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