LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-27-2008, 06:42 AM   #1
Ashkan_s
Member
 
Registered: Jul 2008
Distribution: Fedora
Posts: 77

Rep: Reputation: 22
Question Shell script problem


Hi
I have a shell script code and I can't find the meaning of the $MPB that used there .

here is part of the code:
Code:
fprintf (script, "#-----------( Firestarter " VERSION ", Netfilter kernel subsystem in use )----------#\n");
	fprintf (script, "#                                                                             #\n");
	fprintf (script, "# This firewall was generated by Firestarter on %s              #\n", timestamp);
	fprintf (script, "# http://www.fs-security.com                                                  #\n");
	fprintf (script, "#                                                                             #\n");
	fprintf (script, "#-----------------------------------------------------------------------------#\n\n");
  			
	/* Autoloading of netfilter modules must be done before chains are flushed.*/
    fprintf (script, "\n# --------( Initial Setup - Firewall Modules Autoloader )--------\n\n");

	fprintf (script, "# Remove ipchains module if found\n");
	fprintf (script, "$LSM | grep ipchains -q -s && $RMM ipchains\n\n");

	fprintf (script, "# Try to load every module we need\n");
	fprintf (script, "$MPB ip_tables 2> /dev/null\n");
	fprintf (script, "$MPB iptable_filter 2> /dev/null\n");
	fprintf (script, "$MPB ipt_state 2> /dev/null\n");		
	fprintf (script, "$MPB ip_conntrack 2> /dev/null\n");
	fprintf (script, "$MPB ip_conntrack_ftp 2> /dev/null\n");
	fprintf (script, "$MPB ip_conntrack_irc 2> /dev/null\n");
	fprintf (script, "$MPB ipt_REJECT 2> /dev/null\n");
	/* fprintf (script, "$MPB ipt_REDIRECT 2> /dev/null\n"); */
	fprintf (script, "$MPB ipt_TOS 2> /dev/null\n");
	fprintf (script, "$MPB ipt_MASQUERADE 2> /dev/null\n");
	fprintf (script, "$MPB ipt_LOG 2> /dev/null\n");
	fprintf (script, "$MPB iptable_mangle 2> /dev/null\n");
	fprintf (script, "$MPB ipt_ipv4optsstrip 2> /dev/null\n");
	fprintf (script, "if [ \"$NAT\" = \"on\" ]; then\n"
			 "	$MPB iptable_nat 2> /dev/null\n"
			 "	$MPB ip_nat_ftp 2> /dev/null\n"
			 "	$MPB ip_nat_irc 2> /dev/null\n"
			 "fi\n");

	fprintf (script, "if [ \"EXT_PPP\" = \"on\" ]; then\n"
			 "	$MPB bsd_comp 2> /dev/null\n"
			 "	$MPB ppp_deflate 2> /dev/null\n"
			 "fi\n\n");
 
Old 07-27-2008, 07:12 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 60
It would be more useful if you posted the whole script but, googling around, I find samples where it's just a variable pointing to modprobe.

Code:
# executable file paths
IPT=/sbin/iptables
IFC=/sbin/ifconfig
MPB=/sbin/modprobe
LSM=/sbin/lsmod
RMM=/sbin/rmmod
SYSCTL=/sbin/sysctl


$MPB iptable_filter 2>/dev/null
 
Old 07-27-2008, 07:51 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740
More generally....... "$MPB" says "get the value of the variable named MPB". Somewhere, this has to get created. We would have to know the context of what you have showed us so far.
 
Old 07-27-2008, 08:37 AM   #4
Ashkan_s
Member
 
Registered: Jul 2008
Distribution: Fedora
Posts: 77

Original Poster
Rep: Reputation: 22
Thanks

I find definition of the variable in the other file:
IPT=`which iptables`
IFC=/sbin/ifconfig
MPB=/sbin/modprobe
LSM=`which lsmod`
RMM=/sbin/rmmod
 
  


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
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 06:32 PM
shell script problem. chooi Programming 7 03-26-2005 06:16 PM
Problem in shell script Kumar Programming 4 04-27-2004 09:48 AM
shell script problem steltner Linux - General 19 05-18-2003 03:42 PM
shell script problem steltner Programming 0 05-17-2003 04:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:15 AM.

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