Shell script

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

here is part of the code:

fprintf (script, "#-----------( Firestarter " VERSION ", Netfilter kernel subsystem in use )----------#
");
	fprintf (script, "#                                                                             #
");
	fprintf (script, "# This firewall was generated by Firestarter on %s              #
", timestamp);
	fprintf (script, "# http://www.fs-security.com                                                  #
");
	fprintf (script, "#                                                                             #
");
	fprintf (script, "#-----------------------------------------------------------------------------#

");
  			
	/* Autoloading of netfilter modules must be done before chains are flushed.*/
    fprintf (script, "
# --------( Initial Setup - Firewall Modules Autoloader )--------

");

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

");

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

	fprintf (script, "if  \"EXT_PPP\" = \"on\" ]; then
"
			 "	$MPB bsd_comp 2> /dev/null
"
			 "	$MPB ppp_deflate 2> /dev/null
"
			 "fi

");

   fprintf (script, "
# --------( Initial Setup - Firewall Capabilities Check )--------

");

	fprintf (script, "# Make sure the test chains does not exist
");
	fprintf (script, "$IPT -F test 2> /dev/null
"
			 "$IPT -X test 2> /dev/null
"
			 "if  \"$NAT\" = \"on\" ]; then
"
			 "	$IPT -t nat -F test 2> /dev/null
"
			 "	$IPT -t nat -X test 2> /dev/null
"
			 "fi

");

This is not a shell program. It’s a C program that generates a shell program. Presumably $MPB is defined later when the script is run. It looks like it expands to the name of a utility program.

Thanks for your help

Ashkan s schrieb:
> Hi
> I have a shell script code and I can’t find the meaning of the $MPB
> that used there :confused:.

From the look of it, $MPB is a shell variable that will be set to
“/sbin/modprobe” before the generated script is run. I can’t tell
from here where this assignment might be done, because I don’t know
enough details about how Firestarter works.

HTH
T.