Solaris 10 5/09 安裝指南:自訂 JumpStart 及進階安裝

使用結束程序檔自訂根環境

您也可以使用結束程序檔,自訂已安裝在系統上的檔案。例如,範例 4–5 中的結束程序檔會將資訊附加到根 (/) 目錄中的 .cshrc 檔案,以自訂根環境。


範例 4–5 使用結束程序檔自訂根環境

#!/bin/sh
#
# Customize root's environment
#
echo "***adding customizations in /.cshrc"
test -f a/.cshrc || {
cat >> a/.cshrc <<EOF
set history=100 savehist=200 filec ignoreeof prompt="\$user@`uname -n`> "
alias cp cp -i
alias mv mv -i
alias rm rm -i
alias ls ls -FC
alias h history
alias c clear
unset autologout
EOF
}