e' il mio script di iptables: Quando vado a fare ./iptables start in /etc/init.d nel file di log in /var/log/firewall.log trovo l'errore:
./iptables: /usr/local/bin/rc.firewall: bin/bash: bad interpreter: No such file or directory ecco lo script. #!/bin/bash # ### BEGIN INIT INFO # Provides: SuSE # Required-Start: $network $named $syslog # Required-Stop: $network # Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Description: This script is loading the firewall ### END INIT INFO # Carica il modulo per l'ftp dinamico #/sbin/modprobe ip_nat_ftp if [ -r /etc/rc.status ] ; then . /etc/rc.status fi if [ -r /etc/rc.config ] ; then . /etc/rc.config fi # Determine the base and follow a runlevel link name. base=${0##*/} link=${base#*[SK][0-9][0-9]} return=$rc_done IPTABLES=/usr/sbin/iptables if [ ! -x $IPTABLES ] ; then echo "Can't find ${IPTABLES}" exit 1 fi FIREWALLSCRIPT="/usr/local/bin/rc.firewall" if [ ! -x ${FIREWALLSCRIPT} ] ; then echo "Can't find firewallscript ${FIREWALLSCRIPT}" exit 1 fi LOGFILE=/var/log/firewall.log case "$1" in start) echo -n "Starting Server firewall and NAT services:" ${FIREWALLSCRIPT} 1>${LOGFILE} 2>&1 || return=$rc_failed echo -e "$return" ;; stop) echo -n "Stop firewall and NAT services:" ################################################# # Reset the default policies in the filter table. ################################################# ${IPTABLES} --table filter --policy INPUT ACCEPT ${IPTABLES} --table filter --policy FORWARD ACCEPT ${IPTABLES} --table filter --policy OUTPUT ACCEPT # # reset the default policies in the nat table. # Everything allowed!! # ${IPTABLES} --table nat --policy PREROUTING ACCEPT ${IPTABLES} --table nat --policy POSTROUTING ACCEPT ${IPTABLES} --table nat --policy OUTPUT ACCEPT # # reset the default policies in the mangle table. # ${IPTABLES} --table mangle --policy PREROUTING ACCEPT ${IPTABLES} --table mangle --policy OUTPUT ACCEPT # # flush all the rules in the filter and nat tables. # ${IPTABLES} --table filter --flush ${IPTABLES} --table nat --flush ${IPTABLES} --table mangle --flush # # erase all chains that's not default in filter and nat table. # ${IPTABLES} --table filter --delete-chain ${IPTABLES} --table nat --delete-chain ${IPTABLES} --table mangle --delete-chain echo -e "$return" ;; status) echo "Status firewall and NAT services:" ${IPTABLES} -L ;; restart|reload) $0 stop && $0 start || return=$rc_failed ;; *) echo "Usage: $0 {start|stop|status|restart|reload}" exit 1 esac # Inform the caller not only verbosely and set an exit status. test "$return" = "$rc_done" || exit 1 exit 0 -----Messaggio originale----- Da: Alessandro Pellizzari [mailto:[EMAIL PROTECTED] Inviato: venerdì 28 ottobre 2005 20.37 A: Debian-Italian Oggetto: Re: bin/bash: bad interpreter: No such file or directory On Fri, 2005-10-28 at 20:34 +0200, WannaBe wrote: > bin/bash: bad interpreter: No such file or directory > Da cosa può dipendere l'errore? Manca la / iniziale: /bin/bash Altrimenti posta l'inizio dello script che ci capiamo di piu` Bye. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.12.5/150 - Release Date: 27/10/2005 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]