Slackware :: Write A Script To Switch Between Different Network Configuration?
May 8, 2010
I am running Slackware 12.2.
I have checked the file like /etc/rc.d/rc.inet1.conf, and the command 'ip' or 'ifconfig', but still can not figure out how to write a script to switch between two network configurations easily.
Suppose that one configuration uses DHCP server to dynamically give the ip address, and uses a Default Gateway 1.1.1.1, a net mask 1.0.0.0, a DNS server 1.1.1.0;
and in another configuration the Ip address is fixed, and use a Default Gateway 2.2.2.2, a net mask 2.0.0.0, a DNS server 2.2.2.0;
Anyone would like to give me a hint on how to write one (or two separate) script(s) to switch between these two settings?
Linux beginner, first project is a NAS based on Debian Lenny. Have SMB and AFP running. Hooked to a gigabit network. 8 disk RAID6 with mdadm. Need the NAS to back up our production company's video files.First attempt at back up was very, very slow on smb and afp. Used a Mac disk benchmark app, shows 100+MBps reads, but only .4MBps (as in 400kbps!) writes. Went through office LAN, and also tried just cabling the two machines (MacPro and Debian NAS) directly. Same results. Not sure what the write speeds are internally, as I don't know of any Linux/Debian disk testing software.
I just installed slackware 13 with kernel 2.6.33.4 , everything seems to be ok so far, but the system does not load eth0.Ive tried netconfig , ive tried to configure rc.inet1.conf by hand and run rc.inet1 eth0_start but nothing works.After running netconfig the system says everything is ok , but when I run ifcofnig there is no eth0.
I have a laptop connected to the the net thru an adsl modem, when I switch off the laptop network interface,(thru system-config-network) the light of the laptop network card plugged in the router stays on ( green) where as in my pc, when i do the same thing , the light of my pc network card goes off in the modem
I recently installed slackware and while I was in the process of installing video drivers, I noticed something odd. "init 3" (or init anything) doesn't seem to work for me. While working in XFCE, when I do "init 3", nothing happens. But then, when I do "who -r" it says I am in runlevel 3 even though I am still in XFCE.
Just resently I managed to activate internal bluetooth adapter. I'm not expert in command line and everything I could was done in GNOME. Same like most other systems an icon appears in panel bar whenever I used to type <modprobe omnibook ectype=14>. It took me some time to set everything with the kind help from URL... So the thing is that after fingering with some newly installed packages concerning b-tooth utilities that icon is gone and b-tooth is not active.
One thing I always do is switch to the vmlinuz-generic(-smp) kernel in /etc/lilo.conf and build an initrd (see /boot/README.initrd for details). The "huge" kernel used by default is only meant for installing and not recommended for everyday use. It has a lot of drivers you don't need built-in and uses more RAM than the "generic" kernels.
still trying to find my feet and get to know Slackware. In one of my previous threads, 'things to do after installing' i was told the above message. When i installed, it used the huge kernel, but i'm unsure if that was the one that got installed. when i start slackware up, above the login screen it say, �wecome to Linux 2.6.37.6-smp (tty1)� I was wondering how to swich to the generic smp kernel, do I just change the vmlinuz to the desired, in lilo?
I suspect a few people will eventually run into this problem, and while it's easy to get around for the more experienced users (the ones that *should* be running -current), we all know that everyone isn't in that group
I have a ThinkPad T60 with the AR5008 chipset. I am using a Madwifi driver that I complied from source (this is a fixed driver related to a bug report on this chipset). My Thinkpad has a hardware switch on the front.My problem is that the wireless works whether or not the radio switch is in the on position.I have not been able to figure out how to make the wifi radio turn on and off with the switch.Note that the bluetooth does respect the switch.
I have installed Slack 13.37 for test on VMware. I installed just all - also all avalible distro. kernel imiges:
Code:
vmlinuz-generic-2.6.37.6 vmlinuz-generic-smp-2.6.37.6-smp vmlinuz-huge-2.6.37.6 vmlinuz-huge-smp-2.6.37.6-smp and the default is vmlinuz-huge-smp-2.6.37.6-smp.
Im trying to switch to vmlinuz-generic-2.6.37.6 So, what I did:
I upgraded to current, and x won't start... I suspect it's probably an issue with the Nvidia drivers (I forgot to swith my xorg to the nv drivers; I knew I'd be getting a new kernel). Anyway, it leaves me with an unusable computer. Is there anyway I can get into a console before x tries to start. BTW, the ctrl-alt-f1 hotkey isn't working.
I turned my wifi switch off because I was on a plane, and wanted to save battery, but now Slackware isn't recognizing that it's being turned back on. I toggle the switch in XP, and the light goes from orange to blue, like normal, but no matter what I do in Slackware, the light stays orange. Wicd just tells me there are now wireless networks in range. My wireless card doesn't show up in ifconfig, but lspci shows it fine
I had trouble connecting to a wireless network with openSUSE, so I tried the YAST network manager to see if that fixed it. Not only did it not fix it, but now I cannot connect to any network, wired or wireless. I tried to open the default network manager and it said "Network management disabled". How do I re-enable it?I also have set YAST settings back to their originals with no luck.
Having trouble with mounting drives, I have a usb pen drive that mounts no trouble now I've installed ntfs-3g and modified the fstab. however i can't write to it. I get the error as shown in the attached screen shot.
Since 13.37 I notice that vi needs the 'home' key to switch from input to command mode. I think this is only when I connect via Putty to the machine. When I am on local console it is still ESCape like it used to be. Does anyone know how to set it so that vi will switch from input to command mode using the ESCAPE key when using Putty?
Another vi question : When you edit htm files, vi goes automagically into some sort of html display mode. Ofcourse I never want that since all I do is edit the html in vi. So I need to go to command mode and type :normal everytime I want to edit html files. Where can you configure that vi (or vim) default to normal mode always?
<I see that vi links to elvis : > # ls -al /usr/bin/vi lrwxrwxrwx 1 root root 5 Oct 3 2009 /usr/bin/vi -> elvis*
i want to authenticate user (client) via switch to the radius server(CentOS)Can anyone tell me the authentication/authorization configuration that should be made in the switch (huawei) and the radius server(centos).Esp. the main files under /etc/raddb/ in the Server& the configuration to be made under the radius server template "test"( as of my case)...
I have a USB stick, formatted as FAT32 and I assumed that everybody would be able to read from and write to it. However, I find that if more than one person is logged on to the machine (logged on locally, with "Switch User"), then only one of the users is allowed to write to the stick, and the other users are only allowed to read from it. Is that normal?
Here's the scenario: person A logs into the machine, is in the middle of something but gets called away and the screensaver kicks in. The screen is now locked. Person B comes to the machine to quickly copy a file onto a USB stick, doesn't know person A's password so does a "Switch User" and logs in as themselves. They plug in the stick, can read from it, but can't write to the stick at all. Permission denied.
By doing a "ls -l /media", person B can see that the stick is mounted but is owned by personA with permissions drwxr-xr-x . So only person A can write to the stick. I haven't done extensive testing but it seems to be the person who logged on first who gets to own the stick. It's certainly repeatable as described above. And it's really annoying, because unless person B knows the root password, he can't write to the stick. As a real last resort person B could reboot the computer but he doesn't know whether person A has any important stuff open or not.
I am new to install slackware, i am using scientific linux 6 and first, I don't know how to detect the wireless network and I don't know how to write the grub in my sl, I define the kernel to /boot/vmlinuz, which is a symbolic link, linking to the large single user mode, how can I use different kernels and it's easy to load the kernel but the config file, how should i edit the grub.conf
Has someone tried to build and install wine in squeeze? I tried follow different manuals (e.g. [URL].. but always run into lots of warnings, missing packages and abortion of make. No wonder, squeeze seem to be pretty different from lenny.
I installed the binary wine, but that does not help in my case. There is a kind of bug in code for the mouse that can be fixed only by applying a patch. So anyone want to build wine and write down all the actions?
I have a question, tried to search on the Internet but it is hopeless. I want to write a shell script(bashShell) that will run commands of configuration for vim editor.For example: in the script, it will run ":let", ":set", ":highlight" to configure for vim editor. In addition to, when I searched a pattern and wrote it to file,ed vi to open it automatically. But, I couldn't highlight a word(that is the pattern I'm searching) in vim automatically
I have ubuntu server 10.4 installed on an Intel SS4200-E, which I have configured without any RAID. This machine acts as a media server to another PC. The other PC runs Windows 7 Ultimate. I have 3 1TB hard disks connected to it, and the file system on all the 3 are NTFS. I have mounted the hard disks as ntfs. I have made the folders on all the 3 hard disks shareable. I have configured Samba to make the folders on the hard disks "visible".
The ubuntu machine is in a headless configuration (it doesn't have any VGA card where can connect a monitor). I can configured SSH on it, so I can use putty from the Windows machine to logon to the ubuntu machine, but it is text based only. I am able to see all the 3 disks from the Windows machine. I am able to read/write into 2 of the disks. I am able to read, copy and delete from the 3rd disk, but not write new content to it.
I have a minilinux that I being working on, the problem now is that the serial ports doesn't seem to work (I have 4 serial ports).They don't write or read.
I run the command setserial g /dev/ttySx and it says that his IRQ are 3 or 4 (3 for ttyS0 and ttyS2 , 4 for ttyS1 and ttyS4)�but when I run the command: dmesg | grep ttyS the IRQ�s are 0 for ALL my serial ports� could be this the reason why my serial ports aren�t working right??? And if it is how can I solve the problem??
I just want to configure Vsftpd to allow users to have total access to the FTP server. The server and users are all on a private LAN behind a router with no access from the Net, so I don't need any security. The following basic configuration doesn't allow uploading files after I log on as anonymous/whatever:
Here's what happens when I log on as anonymous/whatever and try to upload a file: > ftp server Connected to server. 220 (vsFTPd 2.0.5) Name (server:root): anonymous 331 Please specify the password. Password:<whatever> 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files.
ftp> ls -al 200 PORT command successful. Consider using PASV. 150 Here comes the directory listing. drwxr-xr-x 3 0 0 4096 Mar 13 11:19 . drwxr-xr-x 3 0 0 4096 Mar 13 11:19 .. drwxr-xr-x 2 0 0 4096 May 25 2010 pub 226 Directory send OK.
ftp> put /var/tmp/ftp local: /var/tmp/ftp remote: /var/tmp/ftp 200 PORT command successful. Consider using PASV. 553 Could not create file.
so, maybe stupidly I tried this. Which seems to have changed nothing.
so then I try
Code:
loadkeys -d
to try and get back to the default. Which doesn't seem to work. so then thinking i should reset everything, try to go in /usr/share/kbd/keymaps/i386/qwerty and do
Code:
loadkeys defkeymap.map.gz
Finally, I go into /etc/X11 and edit xorg.conf-vesa to uncomment
Code:
# If you'd like to switch the positions of your capslock and # control keys, use: # Option "XkbOptions" "ctrl:swapcaps" and restart.
Can Slackware 13.37 write on Win7's NTFS? I'm dual-booting and I've been thinking upgrading to Win7. I need to write to the Windows partition from Slackware and the NTFS-write compatibility will affect my decision.