diff options
| author | Jonathan Bauer | 2013-05-10 18:58:13 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2013-05-10 18:58:13 +0200 |
| commit | c435ba694701a6cf28a724069f37ca44d4d305bf (patch) | |
| tree | 280df91b4211c318e3043a24a2a35f2814fe6b88 | |
| parent | schöne funktion :) (diff) | |
| parent | Add Server install script (diff) | |
| download | tm-scripts-c435ba694701a6cf28a724069f37ca44d4d305bf.tar.gz tm-scripts-c435ba694701a6cf28a724069f37ca44d4d305bf.tar.xz tm-scripts-c435ba694701a6cf28a724069f37ca44d4d305bf.zip | |
Merge branch 'master' of simonslx:openslx-ng/tm-scripts
| -rwxr-xr-x | data/install_server.sh | 30 | ||||
| -rw-r--r-- | remote/modules/kernel/kernel.build | 5 | ||||
| -rwxr-xr-x | remote/modules/vmplayer/data/bin/vmplayer | 6 | ||||
| -rw-r--r-- | remote/modules/vmplayer/vmplayer.build | 13 | ||||
| -rw-r--r-- | remote/modules/vmplayer/vmplayer.conf | 2 | ||||
| -rw-r--r-- | remote/modules/xorg/data/etc/X11/Xsession | 34 |
6 files changed, 84 insertions, 6 deletions
diff --git a/data/install_server.sh b/data/install_server.sh new file mode 100755 index 00000000..947f1688 --- /dev/null +++ b/data/install_server.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +TOOLS="git squashfs-tools rsync" # TODO: lighttpd tftpd(?) + +for tool in $TOOLS; do + echo " ###### Installiere $tool ##########" + apt-get install -y $tool +done + +# lighttpd konfigurieren +# konfig: www-root = /srv/openslx/www + +# tftpd konfigurieren +# tftp root = /srv/openslx/tftp + + +echo " ##### Klone das mltk repository ########" + +git clone git://git.openslx.org/openslx-ng/tm-scripts + +echo "....Fertig" +echo "mltk liegt nun im Verzeichnis $(pwd)/tm-scripts" +echo "Extrahieren und Erstellen der Basissystemdaten:" +echo "./mltk remote stage31 -b" +echo "./mltk remote stage32 -b" +echo "Verpacken der Daten als initramfs:" +echo "./mltk server local stage31 -e stage31" +echo "./mltk server local stage32 -e stage32" +echo "." + diff --git a/remote/modules/kernel/kernel.build b/remote/modules/kernel/kernel.build index 1d8e41a7..9eb6d892 100644 --- a/remote/modules/kernel/kernel.build +++ b/remote/modules/kernel/kernel.build @@ -45,11 +45,12 @@ build() { make oldconfig || perror "make oldconfig failed" fi pinfo "Kompaliere kernel... (this will take some time)" - if gcc --version | grep "4\.7"; then + if gcc --version | grep "4\.7" && which distcc; then pinfo "USING DISTCC" make CC="distcc gcc-4.7" -j16 || perror "make failed" else - make || perror "make failed" + # explicitly state number of cores here, as MAKEFLAGS seems to be overridden + make "-j$CPU_CORES" || perror "make failed" fi # install modules to build directory diff --git a/remote/modules/vmplayer/data/bin/vmplayer b/remote/modules/vmplayer/data/bin/vmplayer index d4cd1d65..874c3d96 100755 --- a/remote/modules/vmplayer/data/bin/vmplayer +++ b/remote/modules/vmplayer/data/bin/vmplayer @@ -1,8 +1,10 @@ #!/bin/sh for mod in /lib/modules/vmware/*.ko; do - insmod "$mod" || xmessage "Could not load kernel module $mod. vmplayer might fail." + insmod "$mod" && continue + xmessage "Could not load kernel module $mod. vmplayer might fail." done -/bin/vmplayer-bin $@ +export LIBCONF_DIR=/usr/lib/vmware/libconf +/usr/lib/vmware/bin/vmplayer $@ diff --git a/remote/modules/vmplayer/vmplayer.build b/remote/modules/vmplayer/vmplayer.build index e228292d..2d44381f 100644 --- a/remote/modules/vmplayer/vmplayer.build +++ b/remote/modules/vmplayer/vmplayer.build @@ -24,8 +24,19 @@ build() { cp -r ./src/vmware-usbarbitrator/bin "$MODULE_BUILD_DIR/usr/" || perror "Could not copy bin from vmware-usbarbitrator." cp -r ./src/vmware-vmx/{bin,etc,sbin} "$MODULE_BUILD_DIR/usr/" || perror "could not copy bin,etc,sbin to usr for vmare-vmx." cp -r ./src/vmware-vmx/lib/{bin,icu,lib,libconf,scripts} "$TARGET" || perror "Could not copy many things from vmware-vmx." - ln -s /usr/lib/vmware/bin/appLoader "$TARGET/bin/vmplayer" || perror "Could not link vmplayer to appLoader." + [ ! -L "$TARGET/bin/vmplayer" ] && { ln -s /usr/lib/vmware/bin/appLoader "$TARGET/bin/vmplayer" || perror "Could not link vmplayer to appLoader."; } chmod +x "$TARGET"/bin/* + pinfo "Patching LIBCONF_DIR" + local file="" + for file in $(grep -rl "@@LIBCONF_DIR@@" "$MODULE_BUILD_DIR"); do + sed -i 's#@@LIBCONF_DIR@@#/usr/lib/vmware/libconf#g' "$file" + done + # Extract libgconf-2 stuff + COPYLIST="list_dpkg_output" + [ -e "${COPYLIST}" ] && rm "${COPYLIST}" + + list_packet_files >> "${COPYLIST}" + tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}" # Compile kernel modules pinfo "Compiling required kernel modules." # build modules diff --git a/remote/modules/vmplayer/vmplayer.conf b/remote/modules/vmplayer/vmplayer.conf index c5d92140..df88968e 100644 --- a/remote/modules/vmplayer/vmplayer.conf +++ b/remote/modules/vmplayer/vmplayer.conf @@ -1,3 +1,5 @@ +#REQUIRED_DEPENDENCIES="libgconf-2-4 fontconfig-config" +#REQUIRED_PACKAGES="libgconf-2-4 fontconfig-config" REQUIRED_BINARIES="" REQUIRED_SYSTEM_FILES="" REQUIRED_DIRECTORIES="/etc /usr" diff --git a/remote/modules/xorg/data/etc/X11/Xsession b/remote/modules/xorg/data/etc/X11/Xsession index 529208cd..a9b3d43b 100644 --- a/remote/modules/xorg/data/etc/X11/Xsession +++ b/remote/modules/xorg/data/etc/X11/Xsession @@ -3,4 +3,36 @@ #Workaround to start Xsession. The original Xsession script includes error handling functionality and sources other scrips from the Xsession.d/ directory. #start selected session -exec $1 + case "$1" in + failsafe) + # Failsafe session was requested. + if [ -e /usr/bin/xterm ]; then + if [ -x /usr/bin/xterm ]; then + exec xterm -geometry +1+1 + else + # fatal error + errormsg "unable to launch failsafe X session ---" \ + "x-terminal-emulator not executable; aborting." + fi + else + # fatal error + errormsg "unable to launch failsafe X session ---" \ + "x-terminal-emulator not found; aborting." + fi + ;; + *) + # Specific program was requested. + STARTUP_FULL_PATH=$(/opt/openslx/usr/bin/which "${1%% *}" || true) + if [ -n "$STARTUP_FULL_PATH" ] && [ -e "$STARTUP_FULL_PATH" ]; then + if [ -x "$STARTUP_FULL_PATH" ]; then + exec $1 + else + message "unable to launch \"$1\" X session ---" \ + "\"$1\" not executable; falling back to default session." + fi + else + message "unable to launch \"$1\" X session ---" \ + "\"$1\" not found; falling back to default session." + fi + ;; + esac |
