Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

Commit 26334e8

Browse files
Add 'PUMP_NAME' parameter to the /etc/init.d/M30pump script (configured via the new /etc/default/M30pump file).
1 parent fec85ab commit 26334e8

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/media/config/etc/default/M30pump

OS/buildroot/overlay/etc/init.d/M30pump

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
#!/bin/sh
2-
if [ -r /etc/default/rcS ]
3-
then
4-
. /etc/default/rcS
2+
if [ -r /etc/default/M30pump ]; then
3+
. /etc/default/M30pump
54
else
6-
echo "/etc/default/rcS not found."
5+
echo "/etc/default/M30pump not found."
76
fi
87

98
MODULE="pump.ko"
109

1110
case "$1" in
1211
insert)
1312
echo "Inserting $MODULE..."
14-
modprobe $MODULE
13+
if [ -z "$PUMP_NAME" ]; then
14+
modprobe $MODULE
15+
else
16+
modprobe $MODULE pump_name=$PUMP_NAME
17+
fi
1518
echo "Inserted $MODULE"
1619
;;
1720
remove)

0 commit comments

Comments
 (0)