そうか、FreeBSD を新しくセットアップする時に、設定内容を設定する野良portsをつくっておいて、それでセットアップすればいいんか!
日本語でおk!自分で読んでも、よくわからん文章だ.
otsune 『私は
cd /usr/ports/sysutils/comconsole
make install
しちゃいます。
(/usr/ports/sysutils/comconsole/pkg-installみると、やっている事は同じ)』 (2007/04/27 17:18)
つまりは、pkg-install にセットアップする内容を記述した野良portsを作っておけば、portsでツールをインストールするのと同様に、サーバのセットアップも出来るということだ.なんでいままで気が付かなかったんだろう.
comconsole 以外にそういう処理をしている ports あるかな?
512,yellow,p0,0$ pwd /usr/ports/sysutils/comconsole 513,yellow,p0,0$ ls -l total 10 -rw-r--r-- 1 root wheel 516 Oct 21 2006 Makefile -rw-r--r-- 1 root wheel 166 Oct 21 2006 pkg-deinstall -rw-r--r-- 1 root wheel 309 Dec 28 1998 pkg-descr -rw-r--r-- 1 root wheel 196 Oct 21 2006 pkg-install -rw-r--r-- 1 root wheel 35 Dec 28 1998 pkg-plist 514,yellow,p0,0$ cat pkg-install #!/bin/sh [ "x$1" = "x" ] && exit 1 if [ "x$2" = "xPOST-INSTALL" ]; then echo "-P" > /boot.config sed -i '' "s|^console.*|console \"/usr/libexec/getty std.9600\" vt100 on secure|" /etc/ttys fi 515,yellow,p0,0$ cat pkg-deinstall #!/bin/sh [ "x$1" = "x" ] && exit 1 if [ "x$2" = "xDEINSTALL" ]; then sed -i '' "s|^console.*|console none unknownoff secure|" /etc/ttys rm -f /boot.config fi 516,yellow,p0,0$ cat pkg-plist @comment We've nothing to do here. 517,yellow,p0,0$