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

📄 copi.funcs

📁 This version of dialog, formerly known as cdialog is based on the Debian package for dialog 0.9a (se
💻 FUNCS
📖 第 1 页 / 共 3 页
字号:
  AKAPRI="`cut $AKASETUP -f1 -d:`"  int2fido "$AKAPRI"  AKAPRIFTN="$_RETVAL"  #invece di "cp $SRC/misc/inn/send-ifmail ~news"#-----------------------------------------------------------------------------  cp copi.sendifm1 ~news/send-ifmail  cat <<EOF >>~news/send-ifmail-p"$BINDIR/ifnews %s" \\EOF  cat copi.sendifm2 >>~news/send-ifmail  chmod 550 ~news/send-ifmail  chown news.news ~news/send-ifmail#invece di "cp $SRC/misc/contrib/ifreq $BINDIR"#-----------------------------------------------------------------------------  cp copi.ifreq1 $BINDIR/ifreq  cat <<EOF >>$BINDIR/ifreq# ifcico-config-file:\$config = "$CFGDIR/config";# change this to the default node, where requests should go to.\$node = "$AKAPRIFTN";EOF  cat copi.ifreq2 >>$BINDIR/ifreq  chmod 755 $BINDIR/ifreq  chown fnet.uucp $BINDIR/ifreq#invece di "cp $SRC/misc/contrib/ifman $BINDIR"#-----------------------------------------------------------------------------  cp copi.ifman1 $BINDIR/ifman  cat <<EOF >>$BINDIR/ifman\$cfgfile="$CFGDIR/config";     # where the config is\$ifowner="fnet";               # who is the owner of the ifmailEOF  cat copi.ifman2 >>$BINDIR/ifman  chmod 755 $BINDIR/ifman  chown fnet.uucp $BINDIR/ifman#invece di "cp $SRC/misc/contrib/ifpoll $BINDIR"#-----------------------------------------------------------------------------  cp copi.ifpoll1 $BINDIR/ifpoll  cat <<EOF >>$BINDIR/ifpollFIDOPATH=$BINDIRLOGPATH=$LOGDIR# sysop of fido stuffIFCICO_SYSOP=$POST# my boss node (default address to poll)NODE=$AKAPRIEOF  cat copi.ifpoll2 >> $BINDIR/ifpoll  chmod 755 $BINDIR/ifpoll  chown fnet.uucp $BINDIR/ifpoll############################################################## se in syslog.conf non c'e' "local0.*", lo aggiunge################################  SYSLOG="`grep \"local0.*	\" /etc/syslog.conf`"  SYSCHECK_A="`echo \"$SYSLOG\" | cut -f1  | grep -x \"local0.*\"`"  SYSCHECK_B="`echo \"$SYSLOG\" | cut -f2- | grep $LOGDIR/sysiflog`"  MYSYSLOG="local0.*\t\t\t\t\t$LOGDIR/sysiflog"  if [ ! "$SYSCHECK_A" -o ! "$SYSCHECK_B" ]  then    echo -e "\n# For ifmail" >> /etc/syslog.conf    echo -e "$MYSYSLOG" >>/etc/syslog.conf    killall -1 syslogd  fi########################  save $AREAS  :> $AREAS  chown fnet.uucp $AREAS  save $FNETCFG  cat <<EOF >$FNETCFG# Configuration file for ifmail (ifgate+ifcico) package by Eugene Crosser# Compile-time default name of this file may be overridden by -I key.## Lines with the first nonblank character '#' are comments.## Log file name. Overrides compile-time default.logfile  $LOGDIR/iflog# Debug file name. Overrides compile-time default.debugfile $LOGDIR/ifdebug# Debugging verbosity level (is overidden by -x key). Default is 0.# WARNING: if >0 your messages will go in /tmp/ifmail !!!!!!!!!!!!!!!!!!verbose  0# The first is the main address:EOF#----------------------------  AKA="any"  IAKA=0  while [ "$AKA" ]  do    IAKA=$[$IAKA+1]    AKA="`cut $AKASETUP -f$IAKA -d:`"    if [ "$AKA" ]    then      int2fidonet $AKA      AKAFTN="`echo $_RETVAL | cut -f1 -d.`"      echo "# aka for `echo $AKAFTN | cut -f2 -d '@'`" >> $FNETCFG      POINT="`echo $POINTS | cut -f$IAKA -d:`"      AKAFTN="`echo $AKAFTN | cut -f1 -d '@'`.$POINT@`echo $AKAFTN | cut -f2 -d '@'`"          echo "address  $AKAFTN" >> $FNETCFG    fi  done#----------------------------  cat <<EOF >>$FNETCFG# Passwords for nodes. Not checked by iftoss (unless -DPARANOID specified# at compile-time), checked by ifcico.# Inserted into outgoing mail packets, EMSI and yoohoo packets.EOF#----------------------------  AKA="any"  IAKA=0  while [ "$AKA" ]  do    IAKA=$[$IAKA+1]    AKA="`cut $AKASETUP -f$IAKA -d:`"    if [ "$AKA" ]    then      int2fido $AKA      AKAFTN=$_RETVAL      PASSWD="`echo $PASSWDS | cut -f$IAKA -d:`"      if [ "$PASSWD" ]      then        echo "password $AKAFTN $PASSWD" >> $FNETCFG      fi    fi  done#----------------------------  cat <<EOF >>$FNETCFG# Include config extention file (here: file with real passwords).# Includes may be nested. If the nesting is cyclic, the program cycles too.# You are warned.# include  $CFGDIR/passwds# System alias file - try to fetch ftn-style aliases from there.# If "from" address of a message from FidoNet matches _right_ side# of some entry in sysalias file, then the Reply-To: header is created# in the RFC message with the name part taken from the left side of the# sysalis entry and domain part taken from myfqdn (below). E.g., if a # fidonet message comes from "John Smith of 1:234/567.89@fidonet" and # there is an entry in the sysalias file:# "jsmith: John.Smith@p89.f567.n234.z1.fidonet.org"# and fqdn value is "pccross.msk.su", then the resulting message will# contain a line: "Reply-To: jsmith@pccross.msk.su".sysalias /etc/aliases# This host fully qualified domain name to add to the alias abovemyfqdn  `hostname -f`# Directory for incoming packets/files:inbound  /var/spool/ifmail/inb# Directories for "listed" and "protected" sessionslistinbound /var/spool/ifmail/inbprotinbound /var/spool/ifmail/inb# Directory for outgoing packets (default domain and zone):# other zones will be like "/var/spool/ifmail/outb.003",# other domains will be like "/var/spool/ifmail/<domain>.<zone>"outbound /var/spool/ifmail/outb# Directory from which the file requests are satisfiedpublic  /var/spool/uucppublic# Directory with executables to satisfy "magic" file requests# if requested a file present in this directory, it will be# executed and stdout sent to the remote system. It is dangerous!# You are warned.magic  $BINDIR/magic# Primary nodelist (serves "outbound" directory and domain from the# first "address" statement). Name expanded with ".NNN" if neccessary.nodelist /var/spool/ifmail/nl.d/`cut $AKASETUP -f1 -d: | cut -f4 -d.`.ndl# Secondary nodelists and nodelists for other domains.# use directory name from the first "nodelist" statement.#           filename          originating addressEOF#----------------------------  AKA="any"  IAKA=0  while [ "$AKA" ]  do    IAKA=$[$IAKA+1]    AKA="`cut $AKASETUP -f$IAKA -d:`"    if [ "$AKA" ]    then      int2fidonet $AKA      AKAFTN="`echo $_RETVAL | cut -f1 -d.`"      echo -e "nodelist  `echo $AKAFTN | cut -f2 -d '@'`.ndl\t$AKAFTN" >> $FNETCFG    fi  done#----------------------------  cat <<EOF >>$FNETCFG# domain translations, just context substitution.  Leading dot recommended.# May contain '@'-sign too.  First matching used.# NOTE: If you specify at least one domtrans line, there will be _NO_# default for fidonet <--> fidonet.org.  Don't forget to specify it# explicitly as a last line.#  		FTN side  			Internet side#domtrans	f720.n335.z2.fidonet.org	giuda.deis.unical.it#domtrans	.fidonet			.fidonet.org# Automatically updated alias database.  If omitted or inaccessible,# ^aREPLYADDR and ^aREPLYTO kludges are generated in fido messages.database	/var/spool/ifmail/ifdbm# Sequencer file (used to generate unique IDs)sequencer	/var/spool/ifmail/seq# Areas file (format: "AREA newsgroup distribution")areas		$CFGDIR/Areas# Bad groups prefixes - do not pass to fido if appear in Newsgroups header# This is NOT the same as "!news.group" in the cnews "sys" file.# badgroup relcom.ads.# badgroup relcom.commerce.# Maximum allowed number of groups in the Newsgroups header, article will# not be gated if exeeds.  If zero or umitted - no limit.# maxgroup    5# Internet -> FidoNet (outgoing) character mapping table (a la mapchan)# outtab  $BINDIR/outkoi8alt# FidoNet -> Internet (incoming) character mapping table# intab  $BINDIR/outaltkoi8# Toss program, used by ifunpackiftoss  $BINDIR/iftossEOF  cat copi.ifmcfg2 >>$FNETCFG  if [ $[$[SPD] > $[19200]] = 1 ]; then    SPDLOCK="L38400"  elif [ $[$[SPD] > $[9600]] = 1 ]; then    SPDLOCK="L19200"  elif [ $[$[SPD] > $[2400]] = 1 ]; then    SPDLOCK="9600"  elif [ $[$[SPD] > $[1200]] = 1 ]; then    SPDLOCK="2400"  elif [ $[$[SPD] > $[300]] = 1 ]; then    SPDLOCK="1200"  else    SPDLOCK="300"  fi  echo "ModemPort modem:$SPDLOCK" >>$FNETCFG  cat copi.ifmcfg5 >>$FNETCFG  echo "PhoneTrans $COUNTRYPREF-$PREF-	/" >>$FNETCFG  echo "PhoneTrans $COUNTRYPREF-		/ $LONG_DIST_PREFIX" >>$FNETCFG  echo "PhoneTrans		/ $INTERCOUNTRYPREF" >>$FNETCFG  echo "ModemReset ATZ\r" >>$FNETCFG  echo "ModemDial \d$DIALSTRING\T\r" >>$FNETCFG  cat copi.ifmcfg4 >>$FNETCFG  echo "Name		$SYSNAME" >>$FNETCFG  echo "Location	$LOCATION" >>$FNETCFG  echo "SysOp		$SYSOP" >>$FNETCFG  echo "Phone		$COUNTRYPREF-$PREF-$PHONE" >>$FNETCFG  echo "Speed		$SPD" >>$FNETCFG  echo "Flags		$NODEFLAGS" >>$FNETCFG  chown fnet.uucp $FNETCFG}# Args: cfg_dirconfigure_smail() {  dialog --backtitle "$TITLE" --infobox "Configuro Smail..." 0 0  USER="`cat $COPIUSER`"  FNETHOME=~fnet  SMAIL=$1  SMAILCONF=$SMAIL/config  ALIASES=$SMAIL/aliases  DIRECTORS=$SMAIL/directors  ROUTERS=$SMAIL/routers  TRANSPORTS=$SMAIL/transports  FTNPATHS=$SMAIL/ftnpaths# File: config  save $SMAILCONF  cat <<EOF >$SMAILCONF##       smail configuration for $HOST.$DOMAIN# (see smail(5) man page for details and other options)#hostnames=$HOST:$HOST.$DOMAINdomains=$DOMAINpostmaster=$USERsmtp_banner="\$primary_name Linux Smail\$version #\$compile_num ready at \$date"spool_mode=0600received_field="Received: \\	\${if def:sender_host \\		{from \$sender_host by \$primary_name \\		\${if def:sender_proto: with \$sender_proto}\\		\n\t(Linux Smail\$version #\$compile_num) }\\	else{by \$primary_name \${if def:sender_proto:with \$sender_proto }\\		(Linux Smail\$version #\$compile_num)\n\t}}\\	id \$message_id; \$spool_date"trusted_users=root:uucp:daemon:fnetEOF# File: routers  save $ROUTERS  cat <<EOF >$ROUTERSifmail: driver=pathalias,	transport=ifmail;	file=ftnpaths,	proto=lsearch,	domain=ftn:orgEOF# File: transports  save $TRANSPORTS  cat <<EOF >$TRANSPORTSlocal:	driver = appendfile,	return_path,	local,	from,	unix_from_hack;	file = /var/spool/mail/\${lc:user},	group = mail,	mode = 0660,	suffix = "\n",	append_as_userifmail: driver=pipe,	from,	-received,	max_addrs=5,	max_chars=200;	pipe_as_sender,	cmd="$FNETHOME/ifmail -r\$host \$((\${strip:user})\$)"EOF# File: directors  save $DIRECTORS# File: aliases  for i in $ALIASES /etc/aliases /usr/lib/aliases  do    if [ ! -L $i -a -f $i ]    then      mv $i $i~    fi  done  USERNAME="`cut /etc/passwd -f1,5 -d: | grep $USER: | cut -f2 -d: | sed y/\" \"/./`"  echo "news: $USER" >> $ALIASES  echo "usenet: $USER" >> $ALIASES  echo "$USERNAME: $USER" >> $ALIASES  ln -sf $ALIASES /etc/  ln -sf $ALIASES /usr/lib/  cd $SMAIL	# is this necessary?? E-mail me if you know,please  mkaliases >/dev/null# File: ftnpaths  save $FTNPATHS  OK=1  IAKA=1  while [ $OK != 0 ]; do    AKA="`cut $AKASETUP -f$IAKA -d:`"    IAKA=$[$IAKA+1]    if [ ! "$AKA" ]; then      OK=0    else      echo -e ".`echo $AKA | cut -f4 -d.`\t\t$AKA!%s" >>$FTNPATHS    fi  done# misc section  chmod 1775 /var/spool/mail  chgrp mail /var/spool/mail  cd $SMAIL  touch forward  /usr/lib/smail/mkdbm forward# reload sendmail  killall sendmail 2>/dev/null  /usr/sbin/sendmail -bd -q15m 	# if inetd handles smtp port, this will not load}

⌨️ 快捷键说明

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