LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Search this Thread
Old 04-17-2007, 11:04 AM   #1
NL-Stitch
Member
 
Registered: Jul 2004
Posts: 75

Rep: Reputation: 16
Knoppix Live cd: Placing WPA keys after software deployment


Hi all,

As some of you already know, we organize Summercamps with 30 Windows XP based gaming rigs.
This specific question is about our network based on Image-based software deployment.
We already have a usable images for our clients from last years summercamps, but some computers got new hardware which is currently making the installations corrupt by WPA.

Our current imaging system works as following:
User insterts a knoppix live cd, and types "knoppix 2" at the startup menu.
Linux live cd boots in text mode.
After the pc is booted, the user must type a web adres to get a perl file and deploy the image.

My question is; can I make a simple shell script that can be run after this software deployment, to mount the hda and place a wpa key in the windows folder?

Note:I do not have any experience with perl or making a new image (the perl script and image where made by someone else), so posting a simple shell script would be usefull. if someone knows perl, heres the script (translated to english) to add some lines:

Code:
# perlscriptje for imaging...

# usage for clients:
# wget -O- 172.16.0.3/doe | perl

die "Don't run this command on the server, you idiot!\n" if `hostname` =~ /zolder/;

$|++;
print "\e[31;1mThe harddisk will be cleaned! If you want to cancel, than unplug the power!\n\n";

for (reverse 1..10) { printf "\t%2d...\n", $_; select(undef, undef, undef, 1.5); }

print "\nHere it goes!\e[0m\n\n";

system 'hdparm -d1 -c1 -k1 /dev/hda >/dev/null';
system 'wget --quiet 172.16.0.3/curl';
system 'chmod 755 curl';
system 'wget --quiet 172.16.0.3/pv';
system 'chmod 755 pv';
my $gzs = 0 + `./curl -sI 172.16.0.3/hda1.gz | grep Content-Length | awk '{print \$2}'`;
my $hdas = 0 + `./curl -s 172.16.0.3/hda1.size`;
system './curl -s 172.16.0.3/hda.mbr > /dev/hda';
system 'hdparm -z /dev/hda';
sleep 3;
system "time ./curl -s 172.16.0.3/hda1.gz | ./pv -cN gz -s $gzs | gzip -cd | ./pv -cN hda1 -s $hdas > /dev/hda1";
system 'yes | ntfsresize -f /dev/hda1';

system 'reboot';



cheers,

NL-Stitch
 
Old 04-25-2007, 12:28 PM   #2
NL-Stitch
Member
 
Registered: Jul 2004
Posts: 75

Original Poster
Rep: Reputation: 16
Does someone have the ability to write a simple shell script that mounts hda1, and places the WPA.dbl and WPA.bak into their place?

Could this one be correct?:

mkdir /mnt/harddisk1/
mount /dev/hda/ /mnt/harddisk1/
wget 10.0.0.1/wpa.dbl
cp wpa.dbl /mnt/harddisk1/windows/system32/
wget 10.0.0.1/wpa.bak
cp wpa.bak /mnt/harddisk1/windows/system32


Greetings,

NL-Stitch
 
Old 04-27-2007, 06:43 AM   #3
NL-Stitch
Member
 
Registered: Jul 2004
Posts: 75

Original Poster
Rep: Reputation: 16
PROBLEM STILL NOT SOLVED
SOMEONE PLEASE HELP ME!!!!!

Or place this topic in programming, because all the Linux network administrators don't seem to have shell scripting experience.

Greetings,

NL,Stitch

Last edited by NL-Stitch; 04-27-2007 at 06:45 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Group deployment software. unreal128 Linux - Networking 3 07-21-2006 08:38 PM
WPA/TKIP with Knoppix 3.8? Jackie78 Linux - Wireless Networking 0 04-03-2005 01:13 PM
remote software deployment project newbie20 Linux - Software 0 09-01-2003 03:38 AM
Deployment Software? Khabi Linux - Software 1 08-28-2003 02:40 PM


All times are GMT -5. The time now is 01:45 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration