Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /opt/custom/share/svc/smartos_setup.sh
- #!/bin/bash
- # Simple Ad Hoc SmartOS Setup Service
- set -o xtrace
- . /lib/svc/share/smf_include.sh
- cd /
- PATH=/usr/sbin:/usr/bin:/opt/custom/bin:/opt/custom/sbin; export PATH
- case "$1" in
- 'start')
- #### Insert code to execute on startup here.
- # hostname "timboudreau.com" && hostname > /etc/nodename
- echo "export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '" >> /root/.bashrc
- echo "export TERM=vt100" >> /root/.bashrc
- echo "export PATH=$PATH:/opt/bin"
- echo "alias ls='ls --color=auto'" >> /root/.bashrc
- echo 'alias vl="vmadm list"' >> /root/.bashrc
- # cp opt/custom/share/ipnat.conf /etc/ipf/
- routeadm -u -e ipv4-forwarding
- # svcadm restart ipfilter
- ln -s /usr/share/vim/vim73/vimrc_example.vim /root/.vimrc
- ;;
- 'stop')
- ### Insert code to execute on shutdown here.
- ;;
- *)
- echo "Usage: $0 { start | stop }"
- exit $SMF_EXIT_ERR_FATAL
- ;;
- esac
- exit $SMF_EXIT_OK
Advertisement
Add Comment
Please, Sign In to add comment