testinstall

来自「伯克利做的SFTP安全文件传输协议」· 代码 · 共 77 行

TXT
77
字号
#!/bin/sh# script to test the install script noninteractively# log filelog=testinstall.logrm -f $log#log=/dev/tty# run it once to setup the directory structure in /tmp/dryecho "Setup..."echo "--- setting up directory structure ---" >> $logecho "n" | perl sc/install.pl -test >> $log || exit 1# put system config files that are similar to what the# install script expects to findecho "creating /tmp/dry/inetd.conf" >> $logcat >/tmp/dry/inetd.conf <<EOF# /etc/inetd.conf sample# some basic servicesecho   	stream	tcp	nowait	root	internalecho   	dgram	udp	wait	root	internal# the main oneftp	stream	tcp	nowait	root	/usr/sbin/tcpd	wu.ftpd -l -i -a -t0telnet	stream  tcp     nowait  root    /usr/sbin/tcpd	in.telnetd# end of inetd.conf sampleEOFecho "creating /tmp/dry/services" >> $logcat >/tmp/dry/services <<EOF# /etc/services sampleecho		7/tcpecho		7/udpftp-data        20/tcp          # File Transfer [Default Data]ftp-data        20/udp          # File Transfer [Default Data]ftp             21/tcp          # File Transfer [Control]ftp             21/udp          # File Transfer [Control]telnet          23/tcptelnet          23/udp# end of /etc/services sampleEOF# run the installer in noninteractive modeecho "Running installer in test mode..."echo "--- main installer ---" >> $logperl sc/install.pl -test -noninter >> $log || exit 1# it would be ideal to check the results of the install,# but that's somewhat complicated for a couple reasons,# so forget it# test the uninstaller tooecho "Running uninstaller in test mode..."echo "--- uninstaller ---" >> $logperl sc/install.pl -test -noninter -u >> $log || exit 1# success!  blow away the stateecho "Removing /tmp/dry..."rm -rf /tmp/dry# all doneecho "--- success ---" >> $logecho "Test install was successful."

⌨️ 快捷键说明

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