Magellan Linux

Contents of /mcore-src/trunk/mcore-tools/initialsetup.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2046 - (show annotations) (download) (as text)
Wed May 8 11:07:04 2013 UTC (10 years, 11 months ago) by niro
File MIME type: application/x-sh
File size: 1636 byte(s)
-added initialsetup helper script
1 # initial setup
2
3 HOST="192.168.0.14"
4 PORT="6666"
5 USER="mcore"
6 PASS="foobar"
7
8 nsslsay()
9 {
10 local command="$@"
11
12 if [[ -z ${command} ]]
13 then
14 echo "nsslsay(): no command given!"
15 exit
16 fi
17
18 nssl ${HOST} ${PORT} << EOF
19 quiet
20 auth ${USER} ${PASS}
21 ${command}
22 quit
23 EOF
24 }
25
26 # some defaults
27 CITRIX_SERVERS="128.20.50.50 128.20.100.31 128.20.100.32"
28 GATEWAY="192.168.0.190"
29 RESOLUTION="800x600"
30 KEYMAP="de"
31 PASSWORD="foobar"
32 RESTART_SERVICES="slim lprng"
33
34 # get some hardware information
35 # netcard
36 nsslsay get hardware.detect device netcard
37 nsslsay get hardware.detect driver netcard
38 # gfxcard
39 nsslsay get hardware.detect info graphic
40 nsslsay get hardware.detect driver graphic
41 nsslsay get hardware.detect info monitor
42
43 # user setup
44 nsslsay set system.passwd root foobar
45 nsslsay set system.passwd mcore foobar
46
47 # set hostname etc
48 nsslsay set network.hostname lala
49 nsslsay get network.hostname
50 nsslsay set network.gateway ${GATEWAY}
51
52 # setup x11
53 nsslsay set input.keymap ${KEYMAP}
54 nsslsay set graphic.resolution ${RESOLUTION}
55
56 # vnc
57 nsslsay set vnc.passwd foobar
58 nsslsay set vnc.enable
59
60 # fluxbox menu
61 nsslsay set fluxbox.menuitem add terminal rxvt
62 nsslsay get fluxbox.menuitem
63
64 # citrix
65 for i in ${CITRIX_SERVERS}
66 do
67 nsslsay set citrix.serverlist add ${i}
68 done
69 nsslsay get citrix.serverlist
70 nsslsay set citrix.session add sum_alert fullscreen
71 nsslsay get citrix.session
72
73 # setup printers
74 nsslsay set printing.printer del
75 nsslsay set printing.printer add l_lala_1 usb1
76 nsslsay set printing.printer add e_lala_1 com1
77 nsslsay get printing.printer
78
79 # restart services
80 for i in ${RESTART_SERVICES}
81 do
82 nsslsay set system.service restart ${i}
83 done