Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-08-2014, 12:30 PM
|
#1
|
Member
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 15 64bit on Desktop Slackwarearm on Raspberry PI v1b
Posts: 382
Rep:
|
Where to put a script
Where should I put a script that needs to run after wireless network is established?
|
|
|
05-08-2014, 12:47 PM
|
#2
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
this is what i do:
Code:
schneidz@xbmc:~$ cat .profile
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
#/home/schneidz/bin/masq.ksh &
(sleep 45 && /usr/bin/sshfs schneidz@mom:media/stuff hyper) &> /dev/null &
else, maybe /etc/rc.local would be adequate ?
|
|
|
05-08-2014, 12:50 PM
|
#3
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
If it is anything like Debian/Rhel, you can look up the wicd utilities, or networkmanager dispatch.d directory for running pre or post scripts.
|
|
|
05-08-2014, 01:15 PM
|
#4
|
Member
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 15 64bit on Desktop Slackwarearm on Raspberry PI v1b
Posts: 382
Original Poster
Rep:
|
Thanks
I had forgotten about WICD pre/post script capabilities.
|
|
|
05-08-2014, 01:55 PM
|
#5
|
Senior Member
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860
|
Quote:
Originally Posted by szboardstretcher
If it is anything like Debian/Rhel [...]
|
Are these threads cross-posted or something? This is on the Slackware forum, so, no, it isn't anything like Debian/Rhel.
---------- Post added 05-08-14 at 01:56 PM ----------
Quote:
Originally Posted by interndan
Where should I put a script that needs to run after wireless network is established?
|
How are you establishing the network connection? /etc/rc.d/rc.inet1 or some other means?
|
|
|
05-08-2014, 02:18 PM
|
#6
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
Quote:
Originally Posted by Richard Cranium
Are these threads cross-posted or something? This is on the Slackware forum, so, no, it isn't anything like Debian/Rhel.
|
They are not.
Quote:
Originally Posted by interndan
Thanks
I had forgotten about WICD pre/post script capabilities.
|
You are welcome.
|
|
|
All times are GMT -5. The time now is 04:46 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|