⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install.sh

📁 sharewall is very good
💻 SH
📖 第 1 页 / 共 2 页
字号:
run_install $OWNERSHIP -m 0644 params ${PREFIX}/usr/share/shorewall/configfiles/paramsif [ -f ${PREFIX}/etc/shorewall/params ]; then    chmod 0644 ${PREFIX}/etc/shorewall/paramselse    run_install $OWNERSHIP -m 0644 params ${PREFIX}/etc/shorewall/params    echo "Parameter file installed as ${PREFIX}/etc/shorewall/params"fi## Install the proxy ARP file#run_install $OWNERSHIP -m 0644 proxyarp ${PREFIX}/usr/share/shorewall/configfiles/proxyarpif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/proxyarp ]; then    run_install $OWNERSHIP -m 0600 proxyarp ${PREFIX}/etc/shorewall/proxyarp    echo "Proxy ARP file installed as ${PREFIX}/etc/shorewall/proxyarp"fi## Install the Stopped Routing file#run_install $OWNERSHIP -m 0644 routestopped ${PREFIX}/usr/share/shorewall/configfiles/routestoppedif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/routestopped ]; then    run_install $OWNERSHIP -m 0600 routestopped ${PREFIX}/etc/shorewall/routestopped    echo "Stopped Routing file installed as ${PREFIX}/etc/shorewall/routestopped"fi## Install the Mac List file#run_install $OWNERSHIP -m 0644 maclist ${PREFIX}/usr/share/shorewall/configfiles/maclistif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/maclist ]; then    run_install $OWNERSHIP -m 0600 maclist ${PREFIX}/etc/shorewall/maclist    echo "MAC list file installed as ${PREFIX}/etc/shorewall/maclist"fi## Install the Masq file#run_install $OWNERSHIP -m 0644 masq ${PREFIX}/usr/share/shorewall/configfiles/masqif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/masq ]; then    run_install $OWNERSHIP -m 0600 masq ${PREFIX}/etc/shorewall/masq    echo "Masquerade file installed as ${PREFIX}/etc/shorewall/masq"fi## Install the Notrack file#run_install $OWNERSHIP -m 0644 notrack ${PREFIX}/usr/share/shorewall/configfiles/notrackif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/notrack ]; then    run_install $OWNERSHIP -m 0600 notrack ${PREFIX}/etc/shorewall/notrack    echo "Notrack file installed as ${PREFIX}/etc/shorewall/notrack"fi## Install the Modules file#run_install $OWNERSHIP -m 0600 modules ${PREFIX}/usr/share/shorewall/modulesecho "Modules file installed as ${PREFIX}/usr/share/shorewall/modules"## Install the TC Rules file#run_install $OWNERSHIP -m 0644 tcrules ${PREFIX}/usr/share/shorewall/configfiles/tcrulesif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/tcrules ]; then    run_install $OWNERSHIP -m 0600 tcrules ${PREFIX}/etc/shorewall/tcrules    echo "TC Rules file installed as ${PREFIX}/etc/shorewall/tcrules"fi## Install the TOS file#run_install $OWNERSHIP -m 0644 tos ${PREFIX}/usr/share/shorewall/configfiles/tosif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/tos ]; then    run_install $OWNERSHIP -m 0600 tos ${PREFIX}/etc/shorewall/tos    echo "TOS file installed as ${PREFIX}/etc/shorewall/tos"fi## Install the Tunnels file#run_install $OWNERSHIP -m 0644 tunnels ${PREFIX}/usr/share/shorewall/configfiles/tunnelsif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/tunnels ]; then    run_install $OWNERSHIP -m 0600 tunnels ${PREFIX}/etc/shorewall/tunnels    echo "Tunnels file installed as ${PREFIX}/etc/shorewall/tunnels"fi## Install the blacklist file#run_install $OWNERSHIP -m 0644 blacklist ${PREFIX}/usr/share/shorewall/configfiles/blacklistif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/blacklist ]; then    run_install $OWNERSHIP -m 0600 blacklist ${PREFIX}/etc/shorewall/blacklist    echo "Blacklist file installed as ${PREFIX}/etc/shorewall/blacklist"fi## Delete the Routes file#delete_file ${PREFIX}/etc/shorewall/routes## Delete the tcstart file#delete_file ${PREFIX}/usr/share/shorewall/tcstart## Delete the Limits Files#delete_file ${PREFIX}/usr/share/shorewall/action.Limitdelete_file ${PREFIX}/usr/share/shorewall/Limit## Delete the xmodules file#delete_file ${PREFIX}/usr/share/shorewall/xmodules## Install the Providers file#run_install $OWNERSHIP -m 0644 providers ${PREFIX}/usr/share/shorewall/configfiles/providersif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/providers ]; then    run_install $OWNERSHIP -m 0600 providers ${PREFIX}/etc/shorewall/providers    echo "Providers file installed as ${PREFIX}/etc/shorewall/providers"fi## Install the Route Rules file#run_install $OWNERSHIP -m 0644 route_rules ${PREFIX}/usr/share/shorewall/configfiles/route_rulesif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/route_rules ]; then    run_install $OWNERSHIP -m 0600 route_rules ${PREFIX}/etc/shorewall/route_rules    echo "Routing rules file installed as ${PREFIX}/etc/shorewall/route_rules"fi## Install the tcclasses file#run_install $OWNERSHIP -m 0644 tcclasses ${PREFIX}/usr/share/shorewall/configfiles/tcclassesif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/tcclasses ]; then    run_install $OWNERSHIP -m 0600 tcclasses ${PREFIX}/etc/shorewall/tcclasses    echo "TC Classes file installed as ${PREFIX}/etc/shorewall/tcclasses"fi## Install the tcdevices file#run_install $OWNERSHIP -m 0644 tcdevices ${PREFIX}/usr/share/shorewall/configfiles/tcdevicesif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/tcdevices ]; then    run_install $OWNERSHIP -m 0600 tcdevices ${PREFIX}/etc/shorewall/tcdevices    echo "TC Devices file installed as ${PREFIX}/etc/shorewall/tcdevices"fi## Install the tcfilters file#run_install $OWNERSHIP -m 0644 tcfilters ${PREFIX}/usr/share/shorewall/configfiles/tcfiltersif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/tcfilters ]; then    run_install $OWNERSHIP -m 0600 tcfilters ${PREFIX}/etc/shorewall/tcfilters    echo "TC Filters file installed as ${PREFIX}/etc/shorewall/tcfilters"fi## Install the rfc1918 file#install_file rfc1918 ${PREFIX}/usr/share/shorewall/rfc1918 0644echo "RFC 1918 file installed as ${PREFIX}/usr/share/shorewall/rfc1918"## Install the default config path file#install_file configpath ${PREFIX}/usr/share/shorewall/configpath 0644echo "Default config path file installed as ${PREFIX}/usr/share/shorewall/configpath"## Install the init file#run_install $OWNERSHIP -m 0644 init ${PREFIX}/usr/share/shorewall/configfiles/initif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/init ]; then    run_install $OWNERSHIP -m 0600 init ${PREFIX}/etc/shorewall/init    echo "Init file installed as ${PREFIX}/etc/shorewall/init"fi## Install the initdone file#run_install $OWNERSHIP -m 0644 initdone ${PREFIX}/usr/share/shorewall/configfiles/initdoneif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/initdone ]; then    run_install $OWNERSHIP -m 0600 initdone ${PREFIX}/etc/shorewall/initdone    echo "Initdone file installed as ${PREFIX}/etc/shorewall/initdone"fi## Install the start file#run_install $OWNERSHIP -m 0644 start ${PREFIX}/usr/share/shorewall/configfiles/startif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/start ]; then    run_install $OWNERSHIP -m 0600 start ${PREFIX}/etc/shorewall/start    echo "Start file installed as ${PREFIX}/etc/shorewall/start"fi## Install the stop file#run_install $OWNERSHIP -m 0644 stop ${PREFIX}/usr/share/shorewall/configfiles/stopif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/stop ]; then    run_install $OWNERSHIP -m 0600 stop ${PREFIX}/etc/shorewall/stop    echo "Stop file installed as ${PREFIX}/etc/shorewall/stop"fi## Install the stopped file#run_install $OWNERSHIP -m 0644 stopped ${PREFIX}/usr/share/shorewall/configfiles/stoppedif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/stopped ]; then    run_install $OWNERSHIP -m 0600 stopped ${PREFIX}/etc/shorewall/stopped    echo "Stopped file installed as ${PREFIX}/etc/shorewall/stopped"fi## Install the ECN file#run_install $OWNERSHIP -m 0644 ecn ${PREFIX}/usr/share/shorewall/configfiles/ecnif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/ecn ]; then    run_install $OWNERSHIP -m 0600 ecn ${PREFIX}/etc/shorewall/ecn    echo "ECN file installed as ${PREFIX}/etc/shorewall/ecn"fi## Install the Accounting file#run_install $OWNERSHIP -m 0644 accounting ${PREFIX}/usr/share/shorewall/configfiles/accountingif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/accounting ]; then    run_install $OWNERSHIP -m 0600 accounting ${PREFIX}/etc/shorewall/accounting    echo "Accounting file installed as ${PREFIX}/etc/shorewall/accounting"fi## Install the Continue file#run_install $OWNERSHIP -m 0644 continue ${PREFIX}/usr/share/shorewall/configfiles/continueif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/continue ]; then    run_install $OWNERSHIP -m 0600 continue ${PREFIX}/etc/shorewall/continue    echo "Continue file installed as ${PREFIX}/etc/shorewall/continue"fi## Install the Started file#run_install $OWNERSHIP -m 0644 started ${PREFIX}/usr/share/shorewall/configfiles/startedif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/started ]; then    run_install $OWNERSHIP -m 0600 started ${PREFIX}/etc/shorewall/started    echo "Started file installed as ${PREFIX}/etc/shorewall/started"fi## Install the Restored file#run_install $OWNERSHIP -m 0644 restored ${PREFIX}/usr/share/shorewall/configfiles/restoredif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/restored ]; then    run_install $OWNERSHIP -m 0600 restored ${PREFIX}/etc/shorewall/restored    echo "Restored file installed as ${PREFIX}/etc/shorewall/restored"fi## Install the Standard Actions file#install_file actions.std ${PREFIX}/usr/share/shorewall/actions.std 0644echo "Standard actions file installed as ${PREFIX}/usr/shared/shorewall/actions.std"## Install the Actions file#run_install $OWNERSHIP -m 0644 actions ${PREFIX}/usr/share/shorewall/configfiles/actionsif [ -z "$CYGWIN" -a ! -f ${PREFIX}/etc/shorewall/actions ]; then    run_install $OWNERSHIP -m 0644 actions ${PREFIX}/etc/shorewall/actions    echo "Actions file installed as ${PREFIX}/etc/shorewall/actions"fi## Install the  Makefiles#run_install $OWNERSHIP -m 0644 Makefile-lite ${PREFIX}/usr/share/shorewall/configfiles/Makefileif [ -z "$CYGWIN" ]; then    run_install $OWNERSHIP -m 0600 Makefile ${PREFIX}/etc/shorewall/Makefile    echo "Makefile installed as ${PREFIX}/etc/shorewall/Makefile"fi## Install the Action files#for f in action.* ; do    install_file $f ${PREFIX}/usr/share/shorewall/$f 0644    echo "Action ${f#*.} file installed as ${PREFIX}/usr/share/shorewall/$f"done# Install the Macro files#for f in macro.* ; do    install_file $f ${PREFIX}/usr/share/shorewall/$f 0644    echo "Macro ${f#*.} file installed as ${PREFIX}/usr/share/shorewall/$f"done## Install the libraries#for f in lib.* ; do    if [ -f $f ]; then	install_file $f ${PREFIX}/usr/share/shorewall/$f 0644	echo "Library ${f#*.} file installed as ${PREFIX}/usr/share/shorewall/$f"    fidone## Symbolically link 'functions' to lib.base#ln -sf lib.base ${PREFIX}/usr/share/shorewall/functions## Create the version file#echo "$VERSION" > ${PREFIX}/usr/share/shorewall/versionchmod 644 ${PREFIX}/usr/share/shorewall/version## Remove and create the symbolic link to the init script#if [ -z "$PREFIX" ]; then    rm -f /usr/share/shorewall/init    ln -s ${DEST}/${INIT} /usr/share/shorewall/initfi## Install the Man Pages#cd manpagesfor f in *.5; do    gzip -c $f > $f.gz    run_install -D  -m 0644 $f.gz ${PREFIX}${MANDIR}/man5/$f.gz    echo "Man page $f.gz installed to ${PREFIX}${MANDIR}/man5/$f.gz"donefor f in *.8; do    gzip -c $f > $f.gz    run_install -D  -m 0644 $f.gz ${PREFIX}${MANDIR}/man8/$f.gz    echo "Man page $f.gz installed to ${PREFIX}${MANDIR}/man8/$f.gz"donecd ..echo "Man Pages Installed"## Install the firewall script#install_file firewall ${PREFIX}/usr/share/shorewall/firewall 0755if [ -z "$PREFIX" -a -n "$first_install" -a -z "$CYGWIN" ]; then    if [ -n "$DEBIAN" ]; then	run_install $OWNERSHIP -m 0644 default.debian /etc/default/shorewall	ln -s ../init.d/shorewall /etc/rcS.d/S40shorewall	echo "shorewall will start automatically at boot"	echo "Set startup=1 in /etc/default/shorewall to enable"	touch /var/log/shorewall-init.log	qt mywhich perl && perl -p -w -i -e 's/^STARTUP_ENABLED=No/STARTUP_ENABLED=Yes/;s/^IP_FORWARDING=On/IP_FORWARDING=Keep/;s/^SUBSYSLOCK=.*/SUBSYSLOCK=/;' /etc/shorewall/shorewall.conf    else	if [ -x /sbin/insserv -o -x /usr/sbin/insserv ]; then	    if insserv /etc/init.d/shorewall ; then		echo "shorewall will start automatically at boot"		echo "Set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf to enable"	    else		cant_autostart	    fi	elif [ -x /sbin/chkconfig -o -x /usr/sbin/chkconfig ]; then	    if chkconfig --add shorewall ; then		echo "shorewall will start automatically in run levels as follows:"		echo "Set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf to enable"		chkconfig --list shorewall	    else		cant_autostart	    fi	elif [ -x /sbin/rc-update ]; then	    if rc-update add shorewall default; then		echo "shorewall will start automatically at boot"		echo "Set STARTUP_ENABLED=Yes in /etc/shorewall/shorewall.conf to enable"	    else		cant_autostart	    fi	elif [ "$INIT" != rc.firewall ]; then #Slackware starts this automatically	    cant_autostart	fi    fifi##  Report Success#echo "shorewall-common Version $VERSION Installed"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -