pkg-rsh.sh

来自「在linux下建立交叉编译环境的she」· Shell 代码 · 共 63 行

SH
63
字号
#!/bin/sh# Script to compile rshd and rcp and store the binaries in a tarball# along with a start script that starts rshd under inetdset -xebuild=pentium-linuxtarget=sh4-unknown-linux-gnutoolcombo=gcc-3.3.2-glibc-2.3.2targetcflags="-m4 -el -static"test -d inetutils-1.4.2 && rm -rf inetutils-1.4.2wget -c ftp://ftp.gnu.org/gnu/inetutils/inetutils-1.4.2.tar.gztar -xzvf inetutils-1.4.2.tar.gzcd inetutils-1.4.2CC=/opt/crosstool/${target}/${toolcombo}/bin/${target}-gcc PATH=$PATH:/opt/crosstool/${target}/${toolcombo}/bin  CFLAGS=${targetcflags} ./configure --host=${target} --build=${build} \  --disable-talkd   \  --disable-telnetd \  --disable-tftpd   \  --disable-uucpd   \  --disable-ftp     \  --disable-ping    \  --disable-rlogin  \  --disable-logger  \  --disable-talk    \  --disable-telnet  \  --disable-tftp    \  --disable-whois   \  --disable-ifconfigPATH=$PATH:/opt/crosstool/${target}/${toolcombo}/bin  makecd ..test -d tmp && rm -rf tmpmkdir -p tmp/bin tmp/sbin tmp/init.dcp inetutils-1.4.2/rshd/rshd tmp/sbincp inetutils-1.4.2/rcp/rcp tmp/bincd tmp# use quotes to avoid interpreting `pwd` while creating following scriptcat > init.d/rshd.sh <<"_EOF_"#!/bin/shdir=`dirname $0`dir=`cd $dir; pwd`case "$1" instart)	# install without taking any precious RAMdisk space	ln -sf $dir/../sbin/rshd /sbin/rshd	ln -sf $dir/../bin/rcp /bin/rcp	echo "shell   stream  tcp     nowait.1000  root    /sbin/rshd" >> /etc/inetd.conf	killall -HUP inetd	;;*)	echo "Usage: $0 start"	exit 1esac_EOF_chmod +x init.d/rshd.shtar -czvf ../rsh.tgz *echo Done.

⌨️ 快捷键说明

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