jbrugman
asked on
Autostart
Like in autoexec.bat from dos,
i'd like to know, how i put the following lines in a similar file from linux.
please explain exactly what to do,
I'm using redhat 6.0
dual boot (NT and Linux with lilo)
the lines that should be automatically loaded are:
ipx_configure --autointerface=on
ipx_configure --autoprimary=on
ncpmount -S servername -U username -P password /mnt/novell -b -c owneroftheconnection
ps, i'd like to edit the particular file with mc, and not the linux.conf editor from X.
Thanks,
Justus
i'd like to know, how i put the following lines in a similar file from linux.
please explain exactly what to do,
I'm using redhat 6.0
dual boot (NT and Linux with lilo)
the lines that should be automatically loaded are:
ipx_configure --autointerface=on
ipx_configure --autoprimary=on
ncpmount -S servername -U username -P password /mnt/novell -b -c owneroftheconnection
ps, i'd like to edit the particular file with mc, and not the linux.conf editor from X.
Thanks,
Justus
The files to put in such start-up commands depend on whether they should be executed on system start-up (like autoexec.bat), or each time a user logs in.
- user login: ~/.profile
- system startup: distribution dependent
For a SuSE (I think RH is quite simular) you could use /etc/rc.d/boot or preferred /etc/rc.d/boot.local. A better place might be the runlevel configuration (usually at /etc/rc.d or /sbin/init.d). Those contain scripts that are called with parameters like 'start', 'stop', 'restart', ... to start/stop services when going from one runlevel to another. To actually activate one of them you need to make a link in the corresponding sub-directory (e.g. rc3.d for runlevel 3). Take a look at the directory listing: the first characters of the link describe in which order those files are executed (e.g. S10... will start a service prior to S11..., K10... will stop (kill) a service prior to K11...).
- user login: ~/.profile
- system startup: distribution dependent
For a SuSE (I think RH is quite simular) you could use /etc/rc.d/boot or preferred /etc/rc.d/boot.local. A better place might be the runlevel configuration (usually at /etc/rc.d or /sbin/init.d). Those contain scripts that are called with parameters like 'start', 'stop', 'restart', ... to start/stop services when going from one runlevel to another. To actually activate one of them you need to make a link in the corresponding sub-directory (e.g. rc3.d for runlevel 3). Take a look at the directory listing: the first characters of the link describe in which order those files are executed (e.g. S10... will start a service prior to S11..., K10... will stop (kill) a service prior to K11...).
If you insist on using mc, then take a look in
/etc/sysconfig/network
/etc/sysconfig/network-scr ipts/ifcfg -eth0
/etc/sysconfig/network-scr ipts/ifup- ipx
/etc/rc.d/init.d/network
Everything you want to do, except the ncpmount, is there already. You only have to add the right parameters to the first two files above.
Linuxconf does this for you. Linuxconf will run in text mode if no DISPLAY variable is set.
I would add the ncpmount line to "/etc/rc.d/rc.local".
/etc/sysconfig/network
/etc/sysconfig/network-scr
/etc/sysconfig/network-scr
/etc/rc.d/init.d/network
Everything you want to do, except the ncpmount, is there already. You only have to add the right parameters to the first two files above.
Linuxconf does this for you. Linuxconf will run in text mode if no DISPLAY variable is set.
I would add the ncpmount line to "/etc/rc.d/rc.local".
ASKER
sorry did not get it to work.
I'm not understanding the script-file
i added the lines in the file, that now looks like:
#!/bin/sh
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
if [ -f /etc/redhat-release ]; then
R=$(cat /etc/redhat-release)
arch=$(uname -m)
a="a"
case "_$arch" in
_a*) a="an";;
_i*) a="an";;
esac
# This will overwrite /etc/issue at every boot. So, make any changes you
# want to make to /etc/issue here or you will lose them when you reboot.
echo "" > /etc/issue
echo "$R" >> /etc/issue
echo "Kernel $(uname -r) on $a $(uname -m)" >> /etc/issue
cp -f /etc/issue /etc/issue.net
echo >> /etc/issue
ipx_configure auto_interface=on
ipx_configure auto_primary=on
ncpmount -S HAB_FILE_SERVER - U Justus -P ******** /mnt/novell -b -c Justus
fi
But no luck yet,
Please help.
I'm not understanding the script-file
i added the lines in the file, that now looks like:
#!/bin/sh
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
if [ -f /etc/redhat-release ]; then
R=$(cat /etc/redhat-release)
arch=$(uname -m)
a="a"
case "_$arch" in
_a*) a="an";;
_i*) a="an";;
esac
# This will overwrite /etc/issue at every boot. So, make any changes you
# want to make to /etc/issue here or you will lose them when you reboot.
echo "" > /etc/issue
echo "$R" >> /etc/issue
echo "Kernel $(uname -r) on $a $(uname -m)" >> /etc/issue
cp -f /etc/issue /etc/issue.net
echo >> /etc/issue
ipx_configure auto_interface=on
ipx_configure auto_primary=on
ncpmount -S HAB_FILE_SERVER - U Justus -P ******** /mnt/novell -b -c Justus
fi
But no luck yet,
Please help.
ASKER
Adjusted points from 100 to 150
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
:-)))))))))) Exactly what i wanted !
You can use any text you wish to edit this file.