summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/etc/vmware-prep
blob: c8a21295ccc7f6b1f967418d21a5dc01060e4af8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

	# main part of vmware preparation script. The wrapper is
	# distro specific ...
        #
        # Description:  Adaptation of a generic runlevel script file 
        # for use with Diskless X Stations (v4.0) - script prepares 
        # vmware environment
        #
        # Author(s):    Michael Janczyk, 26-08-2005
        #               Dirk von Suchodoletz <dirk@goe.net>, 08-03-2006
        # Copyright:    (c) 2003, 2006 - RZ Universitaet Freiburg
        #
        # Version:      0.1a

        . /etc/machine-setup

        # device creation - the module does not trigger udev properly
        for i in 0 1 2 3 4 5 6 7 8 9; do
          [ -c /dev/vmnet$i ] || mknod /dev/vmnet$i c 119 $i; done
        chmod 0700 /dev/vmnet*

        # loop file for exchanging information between linux and vmware
        #cp /var/lib/vmware/import/templ/empty1440.img

	# special start script for vmware with predefined image
        if test -w /usr/X11R6/bin ; then
          path="/usr/X11R6/bin"
          cp /var/lib/vmware/import/templ/runvmware \
            /usr/X11R6/bin
        else
          path="/var/X11R6/bin"
          test -d /var/X11R6/bin || mkdir -p /var/X11R6/bin
          cp /var/lib/vmware/import/templ/runvmware \
            /var/X11R6/bin
        fi

        echo -e "#!/bin/sh\n#\n# file generated by\n#\t$0:\n#\t$date\n
OSTYPE=\`echo \$0 | sed -e \"s,-, ,\" -e \"s,.*/,,\" | awk '{print \$1}'\`
SPECTYPE=\`echo \$0 | sed -e \"s,-, ,\" -e \"s,.*/,,\" | awk '{print \$2}'\`\n
OPTS=\"-o \$OSTYPE \${SPECTYPE:+\"-s \$SPECTYPE\"}\"\n
xterm -bg black -fg white -geometry 170x30+0-0 +sb \
-e \"$path/runvmware \$OPTS $debug\"\n" > $path/desktop-session