Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
Hey Friends
i wonder if it is posable to make a script that only get runned once?
i am rolling out a linux trough PXE (FOG Project), and some drivers really messing up each time, however i found a way to install them easly preinstall.. however i want to make it automaticly, and wondered if there was a way to make a script run once as root?
i wanted to use the init.d or rc.d, but as i want to reboot the system, after the script is done, it would proberly mess up thouse daemons?
Did you create the necessary symlink(s) to run the script in the correct runlevel with chkconfig/insserv/update-rc.d/other? If the script runs in the runlevel(s) you assigned it to, then it would work in my opinion. Best way to find out is to try.
Did you create the necessary symlink(s) to run the script in the correct runlevel with chkconfig/insserv/update-rc.d/other? If the script runs in the runlevel(s) you assigned it to, then it would work in my opinion. Best way to find out is to try.
Kind regards,
Eric
i am kinda of a newbie when it comes to doing changes to the init.d and rc.d
this is was i did so fare
1) created the file /etc/init.d/wlinstall
2) made a ln -s /etc/init.d/wlaninstall /etc/rc5.d/wlinstall
Did you make it executable also? If you created the symlink manually and the permission bits are set correctly then it should work. If you refer to add and remove by the use of commands like the ones I pointed to, then please specify what distribution and version you're using.
Did you make it executable also? If you created the symlink manually and the permission bits are set correctly then it should work. If you refer to add and remove by the use of commands like the ones I pointed to, then please specify what distribution and version you're using.
Kind regards,
Eric
well i only need to run the script once, and then it needs to be completly removed from the computer.. its a post-install script for when i have deployed the linux image to a new computer.. its a linux mint 12 LXDE 32Bit
May be a little bit off topic here, but if this is a thing that you do constantly for many computers (I think so, otherwise the approach install wouldn't make much sense) wouldn't it be easier (and in my eyes more logical) to create a custom kernel package which already contains the necessary drivers instead of installing them afterwards? Or in case of FOG project (which seems to use an image based approach for installing the OS) to install the drivers first and then make the image?
May be a little bit off topic here, but if this is a thing that you do constantly for many computers (I think so, otherwise the approach install wouldn't make much sense) wouldn't it be easier (and in my eyes more logical) to create a custom kernel package which already contains the necessary drivers instead of installing them afterwards? Or in case of FOG project (which seems to use an image based approach for installing the OS) to install the drivers first and then make the image?
already tryed that.. but seems the drivers lock to the mac address.. and wont change.. so it keeps creating new netcards thats dosnt work.
i dont know how to change the mac-address it is locked to, so i need to install them each time
the drivers i am talking about is broadcom sta.. i used this script to install them.
Code:
#! /bin/bash
# Install the wifi drivers for Broadcom 4312 wifi
# Add contrib non-free to the app source list befor using - Note this may not
# be necessary on LMDE
############################################################################
## Update the list of available packages. Install the module-assistant and
## wireless-tools packages:
sudo aptitude update
sudo aptitude -y install module-assistant wireless-tools
## Build and install a broadcom-sta-modules-* package for your system,
## using Module-Assistant:
sudo m-a --quiet --non-inter a-i broadcom-sta
## Rebuild your initial ramdisk, to blacklist modules defined at
## /etc/modprobe.d/broadcom-sta-common.conf within initramfs:
sudo update-initramfs -u -k $(uname -r)
## Unload conflicting modules:
sudo modprobe -r b44 b43 b43legacy ssb
sudo echo "blacklist b44" >> /etc/modprobe.d/blacklist.conf;
sudo echo "blacklist b43" >> /etc/modprobe.d/blacklist.conf;
sudo echo "blacklist b43legacy" >> /etc/modprobe.d/blacklist.conf;
sudo echo "blacklist ssb" >> /etc/modprobe.d/blacklist.conf;
sudo echo "blacklist brcm80211">> /etc/modprobe.d/blacklist.conf;
sudo echo "blacklist acer_wmi">> /etc/modprobe.d/blacklist.conf;
## Load the wl module:
sudo modprobe wl
## Verify your device has an available interface:
sudo iwconfig
## Configure your wireless interface as appropriate.
## At this point I don't think that the wl driver will load on startup so
sudo echo wl >> /etc/modules
#remove script from startup
sudo update-rc.d -f wlinstall remove
i had to blacklist alot of modules to get it to work on my lenovo ideapad s12
I don't know much about Mint LXDE, but doesn't it contain the jockey program (known as "Additional Drivers" or "Restricted Drivers")? In that case a simple
I don't know much about Mint LXDE, but doesn't it contain the jockey program (known as "Additional Drivers" or "Restricted Drivers")? In that case a simple
Code:
jockey-text -e kmod:wl
should do all of that stuff for you.
The drivers didn't work, there is a hard switch, that jams, when I tried the restricted drivers :-(
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.