Bug 6066 - Update initscript: use separate file for options
: Update initscript: use separate file for options
Status: CLOSED WONTFIX
: Sisyphus
(All bugs in Sisyphus/slmodemd)
: unstable
: all Linux
: P2 enhancement
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2005-02-08 18:12 by
Modified: 2010-01-06 20:53 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-02-08 18:12:01
Было бы неплохо обновить /etc/rc.d/init.d/slmodemd на предмет использования
файла конфигурации.

Например, вот так:

--- slmodemd~   2005-02-08 16:55:29 +0200
+++ slmodemd    2005-02-08 17:01:54 +0200
@@ -15,13 +15,17 @@
 # Source function library.
 . /etc/init.d/functions

+SourceIfNotEmpty /etc/sysconfig/slmodem
+# Set the default device
+DEVICE=${DEVICE-/dev/slamr0}
+
 PIDFILE=/var/run/slmodemd.pid
 LOCKFILE=/var/lock/subsys/slmodemd
 RETVAL=0

 start()
 {
-       action "Starting slmodem daemon: " start-stop-daemon --quiet --start -b
-m --pidfile $PIDFILE --exec /usr/sbin/slmodemd -- --country=RUSSIA
+       action "Starting slmodem daemon: " start-stop-daemon --quiet --start -b
-m --pidfile $PIDFILE --exec /usr/sbin/slmodemd -- $OPTIONS "$DEVICE"
        RETVAL=$?
        return $RETVAL
 }

===============
$ cat /etc/sysconfig/slmodem 
# Set device name (optional). Default value is /dev/slamr0
#DEVICE=/dev/dsp1

# Set additional slmodemd options 
OPTIONS="--country=RUSSIA"

==============

В частности, мне понадобилось указать другой девайс...
------- Comment #1 From 2008-03-11 15:10:27 -------
Reassign to nobody@.
------- Comment #2 From 2010-01-06 20:53:29 -------
Пакета в сизифе давно (после M40) нет.