Re: debian script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Beny,
I do not know that much about debian, but I know that in
slmodem-2.9.11-2008/scripts/debian
There should be a script for debian as well
There are for SUSE, mandriva, slackware and I believe there should be
one for debian.
slmodem-2.9.11-20080126/scripts/
slmodem-2.9.11-20080126/scripts/slmodem.spec
slmodem-2.9.11-20080126/scripts/debian/
slmodem-2.9.11-20080126/scripts/debian/slmodemd
slmodem-2.9.11-20080126/scripts/slackware/
slmodem-2.9.11-20080126/scripts/slackware/README
slmodem-2.9.11-20080126/scripts/slackware/rc.slmodemd
slmodem-2.9.11-20080126/scripts/suse/
slmodem-2.9.11-20080126/scripts/suse/slmodemd.conf
slmodem-2.9.11-20080126/scripts/suse/slmodemd.SUSE
slmodem-2.9.11-20080126/scripts/mandrake/
slmodem-2.9.11-20080126/scripts/mandrake/slmodemd
slmodem-2.9.11-20080126/scripts/slmodemd
slmodem-2.9.11-20080126/scripts/slmodemd.ubuntu.italy
For Debian
slmodem-2.9.11-20080126/scripts/debian/
slmodem-2.9.11-20080126/scripts/debian/slmodemd
>From debian FAQ page
http://www.debian.org/doc/FAQ/ch-customizing.en.html
Suppose a system needs to execute script foo on start-up, or on entry
to a particular (System V) runlevel. Then the system administrator
should:
Enter the script foo into the directory /etc/init.d/.
Run the Debian command update-rc.d with appropriate arguments, to set
up links between the (command-line-specified) directories rc?.d and
/etc/init.d/foo. Here, '?' is a number from 0 through 6 and
corresponds to each of the System V runlevels.
Reboot the system.
The command update-rc.d will set up links between files in the
directories rc?.d and the script in /etc/init.d/. Each link will begin
with a 'S' or a 'K', followed by a number, followed by the name of the
script. Scripts beginning with 'S' in /etc/rcN.d/ are executed when
runlevel N is entered. Scripts beginning with a 'K' are executed when
leaving runlevel N.
One might, for example, cause the script foo to execute at boot-up, by
putting it in /etc/init.d/ and installing the links with update-rc.d
foo defaults 19. The argument 'defaults' refers to the default
runlevels, which are 2 through 5. The argument '19' ensures that foo
is called before any scripts containing numbers 20 or larger.
For the modprobe.conf file, it might be better to ask Marv for
guidance on this one, since he knows about more Debian than I do.
Regards,
Antonio
On 3/10/08, Beny Spira <benys@xxxxxx> wrote:
> Hi Antonio and the list
>
> Some time ago I asked for help regarding a problem with my sm56 modem,
> that needed to be reinstalled everytime I booted the machine. Antonio
> sent me some instructions of how to solve it (see below). Now, i
> changed my linux distribution to Debian (kernel 2.6.18-5-686) and am
> having the same problem with the modem.
> I've found out there are some differences between Mandriva and Debain,
> such as in Debian there is not a /etc/rc.d/init.d/ folder, instead
> there is a /etc/init.d and also there is not a /etc/modprobe.conf
> file.
> My question is where should I add the following line:
>
> 'install slamr modprobe --ignore-install ungrab-winmodem ; modprobe
> --ignore-install slamr; test -e /dev/slamr0 || (/bin/mknod -m 660
> /dev/slamr0 c 242 0 2>/dev/null && chgrp uucp /dev/slamr0)'
>
> Thanks in advance,
> Beny
>
>
>
>
> Copy the script slmodemd on slmodem-2.9.11-20070430/scripts/mandrake
> to /etc/rc.d/init.d/
>
> Add the following as a single line
> /* for automation/autoloading of slmodemd, Thanks Marv for your advice */
> Add the following as a single line to /etc/modprobe.conf
> Note: you need to become superuser su - or su - root,
>
> install slamr modprobe --ignore-install ungrab-winmodem ; modprobe
> --ignore-install slamr; test -e /dev/slamr0 || (/bin/mknod -m 660
> /dev/slamr0 c 242 0 2>/dev/null && chgrp uucp /dev/slamr0)
>
>
> # cd /etc/rc.d/init.d/
> # chmod +x slmodemd
> # chkconfig slmodemd --add
> # chkconfig slmodemd --list
>
> [root@localhost init.d]# head -8 slmodemd
> #!/bin/sh
> #
> # slmodemd: Starts the SmartLink Modem Daemon
> #
> # chkconfig: 345 90 10
> # description: This is the user space part of the
> SmartLink Modem driver
> # processname: slmodemd
> # config: /etc/sysconfig/slmodem
> [root@localhost init.d]#
>
> The chkconfig line & description line must go into
> every script that is to go under the control of
> chkconfig. The description line seems pretty
> self-explanatory. the chkconfig line:
>
> # chkconfig: 345 90 10
> | | |
> | | priority for kill scripts
> | |
> | priority for start scripts
> |
> run levels at which to start service
>
> [root@localhost init.d]# cd ..
> [root@localhost rc.d]# for i in 0 1 2 3 4 5 6
> > do
> > ls rc$i.d/*slmodemd*
> > done
> rc0.d/K10slmodemd
> rc1.d/K10slmodemd
> rc2.d/S90slmodemd
> rc3.d/S90slmodemd
> rc4.d/S90slmodemd
> rc5.d/S90slmodemd
> rc6.d/K10slmodemd
> [root@localhost rc.d]#
>
> you might need to add to /etc/rc.d/init.d/slmodemd the lines
>
> modprobe ungrab-winmodem
> modprobe slamr
> if the modem is not autostarted.
>
> for #2 you can try to change the Init strings with an +MS=90 like
>
> /etc/wvdial.conf
> [Dialer Defaults]
> Modem = /dev/ttySL0
> Baud = 460800
> Init1 = ATZ
> Init2 = ATQ0 V1 E1 S0=0 X3 &C1 &D2 +MS=90
> ISDN = 0
> Modem Type = Analog Modem
> Phone = 7072000
> Username = my_username
> Password = my_password
> Carrier Check = no
> Stupid Mode = yes
> Auto DNS = yes
> [root@localhost ~]#
>
> Hope this helps. Report back success/failure of autoloading of slmodemd.
>
> Regards,
>
> Antonio
>
> On 8/7/07, Beny Spira <benys@xxxxxx> wrote:
> > Hi
> > My motorola SM56 modem was installed with slmodem-2.9.11-20070430 and
> > ungrab-winmodem-20070430 in Mandriva 2007. It works fine, except that
> every
> > time the computer is restarted, both drivers have to be installed again
> (make
> > install). It doesn't help to only load the drivers with modprobe, they
> really
> > have to be reinstalled.
> >
> > Two questions:
> > 1- What should be done to avoid the problem with the reinstallation?
> > 2- The maximum connection spreed is 26000. Is there a way to improve
> that?
> >
> > Any help would be appreciated.
> > Beny
> >
> >
>
> --
> Beny Spira
> Departamento de Microbiologia
> Instituto de Ciências Biomédicas
> Universidade de São Paulo
> Av. Prof. Lineu Prestes 1374
> São Paulo-SP CEP:05508-900
> Brasil
> Tel: 5511-3091-7347
> FAX: 5511-3091-7354
> E-mail: benys@xxxxxx
> Homepage: www.icb.usp.br/~benys
>


[Index of Archives]     [Linux Media Development]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Fedora Women]     [Linux USB]

  Powered by Linux