#!/bin/ksh set -e rel=8.1 print ksh... \\c chpass -s /bin/ksh root useradd -D -s /bin/ksh && print done print motd... \\c [[ ! -f /etc/motd.dist ]] && mv /etc/motd /etc/motd.dist && print done || print already #export PKG_PATH="ftp://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/$rel/All/" #export PKG_PATH="http://ftp.fr.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/$rel/" #export PKG_PATH="http://cdn.NetBSD.org/pub/pkgsrc/packages/\$(uname -s)/\$(uname -m)/\$(uname -r|cut -f '12' -d.)/All/" print shrc... \\c if [[ -f /etc/shrc.dist ]]; then print already else mv /etc/shrc /etc/shrc.dist cat > /etc/shrc </dev/null ) && set -o tabcomplete bind -m '^L'='clear^M' alias ll='ls -alhF' alias cp='cp -i' alias mv='mv -i' alias rm='rm -i' alias poweroff='echo NOT A GNU SYSTEM - SEE SHUTDOWN(8)' alias reboot='echo NOT A GNU SYSTEM - SEE SHUTDOWN(8)' alias halt='echo NOT A GNU SYSTEM - SEE SHUTDOWN(8)' alias neta='netstat -aA -f inet -f inet6' alias netl='netstat -anA -f inet -f inet6 | grep LISTEN' alias runq='postfix flush' #export TERM=xterm dmesg | egrep 'cpu[[:digit:]]:' | grep -v package dmesg | grep 'total memory =' w -nw ;; esac EOF9 fi print profile... \\c [[ ! -f /etc/profile.dist ]] \ && cp -p /etc/profile /etc/profile.dist \ && echo 'export ENV=/etc/shrc' >> /etc/profile && print done \ || print already print skeletons... \\c if [[ -d /etc/skel.dist/ ]]; then print already else mv /etc/skel/ /etc/skel.dist/ mkdir /etc/skel/ && print done fi print timezone... \\c ln -sf ../usr/share/zoneinfo/Europe/Moscow /etc/localtime && print done #ln -sf ../usr/share/zoneinfo/Europe/Paris /etc/localtime && print done print kern.securelevel... \\c [[ -z `grep kern.securelevel= /etc/sysctl.conf` ]] \ && echo kern.securelevel=1 >> /etc/sysctl.conf && print done \ || print already print securelevel... \\c [[ -z `grep securelevel= /etc/rc.conf` ]] \ && echo securelevel=1 >> /etc/rc.conf && print done \ || print already print disable inetd... \\c if [[ -n `grep inetd= /etc/rc.conf` ]]; then print already else /etc/rc.d/inetd stop echo inetd=no >> /etc/rc.conf && print done fi print sshd... \\c if [[ -f /etc/ssh/sshd_config.dist ]]; then print already else print SSHD NOT CONFIGURED BY NETBSD.INSTALL.BASH SCRIPT ? fi print indexing... \\c /usr/libexec/locate.updatedb && print done print log wrapper... \\c [[ ! -f /root/log ]] && cat > /root/log <> $target/etc/rc.conf && echo done \ # || echo already