# initial setup HOST="192.168.0.14" PORT="6666" USER="mcore" PASS="foobar" nsslsay() { local command="$@" if [[ -z ${command} ]] then echo "nsslsay(): no command given!" exit fi nssl ${HOST} ${PORT} << EOF quiet auth ${USER} ${PASS} ${command} quit EOF } # some defaults CITRIX_SERVERS="128.20.50.50 128.20.100.31 128.20.100.32" GATEWAY="192.168.0.190" RESOLUTION="800x600" KEYMAP="de" PASSWORD="foobar" RESTART_SERVICES="slim lprng" # get some hardware information # netcard nsslsay get hardware.detect device netcard nsslsay get hardware.detect driver netcard # gfxcard nsslsay get hardware.detect info graphic nsslsay get hardware.detect driver graphic nsslsay get hardware.detect info monitor # user setup nsslsay set system.passwd root foobar nsslsay set system.passwd mcore foobar # set hostname etc nsslsay set network.hostname lala nsslsay get network.hostname nsslsay set network.gateway ${GATEWAY} # setup x11 nsslsay set input.keymap ${KEYMAP} nsslsay set graphic.resolution ${RESOLUTION} # vnc nsslsay set vnc.passwd foobar nsslsay set vnc.enable # fluxbox menu nsslsay set fluxbox.menuitem add terminal rxvt nsslsay get fluxbox.menuitem # citrix for i in ${CITRIX_SERVERS} do nsslsay set citrix.serverlist add ${i} done nsslsay get citrix.serverlist nsslsay set citrix.session add sum_alert fullscreen nsslsay get citrix.session # setup printers nsslsay set printing.printer del nsslsay set printing.printer add l_lala_1 usb1 nsslsay set printing.printer add e_lala_1 com1 nsslsay get printing.printer # restart services for i in ${RESTART_SERVICES} do nsslsay set system.service restart ${i} done