LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 09-03-2004, 05:32 AM   #1
pevelius
Member
 
Registered: Mar 2004
Location: Tampere, Finland
Distribution: Debian, Familiar, OS X
Posts: 145

Rep: Reputation: 16
init.d startup script for familiar (solved)


hi

i have a problem, i hope you guys can help me.

on familiar linux 0.7.2 and opie 1.0.3 i´d like to be able to use bluetooth gprs after boot.

i have managed to configure my system to the state where i boot, tap bt tray icon to enable bt, open console and type "rfcomm bind all". then tap network and dial to gprs phone.

but how can i do "rfcomm bind all" during boot so that i don´t have to type it?

i tried to make a script to /etc/init.d:
---
#! /bin/sh
rfcomm bind all
---
named it rfcommbindall, made chmod 755, made ln -s /etc/rc5.d/S60rfcommbindall /etc/init.d/rfcommbindall

but it doesn´t work


Last edited by pevelius; 09-03-2004 at 11:26 AM.
 
Old 09-03-2004, 06:34 AM   #2
Geronimo
Member
 
Registered: Aug 2004
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 52

Rep: Reputation: 15
The init.d scripts work with the start-stop-deamon....

I don't know how it work exactly, but have a look at this. It a scripts to initiate ndiswrapper during startup...
Code:
#!/sbin/runscript
        start() {
                ebegin "Bringing WLAN (NDISwrapper) up"
                modprobe ndiswrapper #2> /dev/null
                iwconfig wlan0 mode ad-hoc essid *******
                iwconfig wlan0 mode managed essid ********
                /sbin/dhcpcd wlan0 -t 5 &
                eend 0
        }

        stop() {
                ebegin "Bringing WLAN (NDISwrapper) down"
                /sbin/ifconfig eth1 down &> /dev/null
                rmmod ndiswrapper 2>/dev/null
                eend 0
        }
just replace the parts between ebegin and eend.... The string after ebegin is the standart output if the script is run.
I am not sure what you'll have to put into the stop part, but it has to be something like rfpromm unbind all.... check your manual

to test it, if it works, just use
Code:
/etc/init.d/<script> start
/etc/init.d/<script> stop
Greets
G.
 
Old 09-03-2004, 11:22 AM   #3
pevelius
Member
 
Registered: Mar 2004
Location: Tampere, Finland
Distribution: Debian, Familiar, OS X
Posts: 145

Original Poster
Rep: Reputation: 16
thanks for reply. however i was able to solve the problem with the kind help of #handhelds.org irc-channel. the solution is to put the symlink to /etc/rc2.d/ instead of /etc/rc5.d/. so, now it works perfectly. it seems that it does not need start/stop abilities (but maybe they should be there to make it more sophisticated). but hey, as long as good ol´quick´n dirty works, i´m happy.

Last edited by pevelius; 09-03-2004 at 11:26 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 Linux Mandrake 10.2 init (SysV) startup script RomanG Mandriva 0 06-13-2005 12:15 AM
ptal-init loading at startup mykrob Linux - Software 3 09-29-2004 07:05 AM
Why won’t this init.d startup script work? dholingw Linux - Software 2 06-08-2004 02:40 PM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 01:31 AM
startup scripts for init.d/ soredz Red Hat 2 10-16-2003 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 10:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration