pkg-chrootshell.sh

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

SH
45
字号
#!/bin/sh# Script to compile chrootshell and store the binaries in a tarball# along with a startup scriptset -xebuild=pentium-linuxtarget=sh4-unknown-linux-gnutoolcombo=gcc-3.3.2-glibc-2.3.2targetcflags="-m4 -el -static"test -d tmp && rm -rf tmpmkdir -p tmp/sbin tmp/init.dCC=/opt/crosstool/${target}/${toolcombo}/bin/${target}-gcc$CC -DDEBUG_PRINTS chrootshell.c $targetcflags -o tmp/sbin/chrootshell# use quotes to avoid interpreting `pwd` while creating following scriptcat > tmp/init.d/chrootlogin.sh <<"_EOF_"#!/bin/shdir=`dirname $0`dir=`cd $dir; pwd`case "$1" instart)	# install without taking any precious RAMdisk space	ln -sf $dir/../sbin/chrootshell /sbin/chrootshell	chmod 4755 /sbin/chrootshell	echo "root-jail::0:0:Outer Jail Account:/jail:/sbin/chrootshell" >> /etc/passwd	;;*)	echo "Usage: $0 start"	exit 1esac_EOF_chmod +x tmp/init.d/chrootlogin.shcd tmptar -czvf ../chrootlogin.tgz *echo Done.

⌨️ 快捷键说明

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