patch: ltsp-suse-plugin.diff

CyberOrg <[email protected]>
Newsgroups gmane.linux.terminal-server.devel
Message-ID <[email protected]>
Hi

Here is another go at the "proper" ltsp plugin for openSUSE.

Cheers

-J

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_____________________________________________________________________
Ltsp-developer mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-developer
For additional LTSP help,   try #ltsp channel on irc.freenode.net
ltsp-suse-plugin.diff (text/x-patch, 8.8 KB)
=== modified file 'server/ltsp-build-client'
--- server/ltsp-build-client	2008-03-24 17:25:35 +0000
+++ server/ltsp-build-client	2008-03-24 20:14:27 +0000
@@ -10,7 +10,7 @@
     . /etc/sysconfig/ltspdist
     VENDOR=$VENDORDEF
 else
-    VENDOR=$(lsb_release -i -s)
+    VENDOR=$(lsb_release -i -s | tr " " "_")
 fi
 export BASE=${BASE:-/opt/ltsp}                       # LTSP base directory
 MODULES_BASE=${MODULES_BASE:-/usr/share/ltsp} # our modules place

=== added directory 'server/plugins/ltsp-build-client/SUSE_LINUX'
=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/000-check-paths'
=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/000-enable-debug'
--- server/plugins/ltsp-build-client/SUSE_LINUX/000-enable-debug	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/000-enable-debug	2008-03-24 19:15:20 +0000
@@ -0,0 +1,10 @@
+case "$MODE" in
+    commandline)
+            add_option "debug" "`eval_gettext "Enable debug support"`" "advanced" "false"
+            ;;
+    configure)
+            if [ -n "$option_debug_value" ]; then
+                LTSP_DEBUG="1" # Set on configure to have it set for all plugins
+            fi
+            ;;
+esac

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/001-load-configuration-file'
--- server/plugins/ltsp-build-client/SUSE_LINUX/001-load-configuration-file	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/001-load-configuration-file	2008-03-24 19:25:22 +0000
@@ -0,0 +1,23 @@
+case "$MODE" in
+    commandline)
+        add_option "config" "`eval_gettext "Load a user specific configuration file"`" "advanced" "false"
+        ;;
+    configure)
+        CONFIG="/etc/sysconfig/kiwi-ltsp"
+	KIWI_LTSP_FUNCTIONS="/etc/sysconfig/kiwi-ltsp-functions.sh"
+        if [ -n "$option_config_value" ]; then
+            CONFIG="$option_config_value"
+
+            if [ ! -e "$CONFIG" ]; then
+                echo "Failed to read file. '$CONFIG' cannot be found."
+                exit 1
+            fi
+        fi
+        
+        if [ -e "$CONFIG" ]; then
+            debug "Loading configuration files '$CONFIG' and $KIWI_LTSP_FUNCTIONS."
+            . $CONFIG
+	    . $KIWI_LTSP_FUNCTIONS
+        fi
+        ;;
+esac

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/001-set-arch'
--- server/plugins/ltsp-build-client/SUSE_LINUX/001-set-arch	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/001-set-arch	2008-03-24 19:32:21 +0000
@@ -0,0 +1,33 @@
+#Support 32bit only for now, remaining archs handled by kiwi directly. Will make available after testing.
+case "$MODE" in
+    commandline)
+        add_option "arch" "`eval_gettext "set the target architecture"`" "advanced" "true"
+        ;;
+    configure)
+        if [ -n "$option_arch_value" ]; then
+            ARCH_OPT="$option_arch_value"
+        else
+            ARCH_OPT=$(uname -m | sed -e s/i.86/i386/ -e s/ppc.*/powerpc/)
+        fi
+
+        # Validate the proposed architecture value.
+        case "$ARCH_OPT" in
+            i386)
+            case "$(uname -m)" in
+                x86_64|ia64|i386|i486|i586|i686)
+                ARCH=i386
+                ;;
+                *)
+                printf "`eval_gettext "ERROR: --arch %s called on unsupported arch: %s"`", i386 $(uname -m)
+                exit 1
+                ;;
+            esac
+            ;;
+            *)
+            printf "`eval_gettext "ERROR: unsupported architecture. Check your --arch argument: %s"`", $ARCH_OPT
+            printf "`eval_gettext "       supported values are: %s"`", "i386"
+            exit 1
+            ;;
+        esac      
+        ;;
+esac

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/001-set-dist'
--- server/plugins/ltsp-build-client/SUSE_LINUX/001-set-dist	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/001-set-dist	2008-03-24 19:20:04 +0000
@@ -0,0 +1,10 @@
+case "$MODE" in
+    commandline)
+        add_option "dist" "`eval_gettext "Set the distribution to be used for install"`" "regular" "true"
+        ;;
+    configure)
+        if [ -n "$option_dist_value" ]; then
+            SUSE_VERSION="$option_dist_value"
+        fi
+        ;;
+esac

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/001-set-exclude'
--- server/plugins/ltsp-build-client/SUSE_LINUX/001-set-exclude	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/001-set-exclude	2008-03-24 19:21:01 +0000
@@ -0,0 +1,1 @@
+#handled by kiwi's config.xml

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/010-chroot-tagging'
--- server/plugins/ltsp-build-client/SUSE_LINUX/010-chroot-tagging	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/010-chroot-tagging	2008-03-24 19:21:42 +0000
@@ -0,0 +1,1 @@
+#This is set by rpm package that is installed in the chroot

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/010-etc-hosts'
--- server/plugins/ltsp-build-client/SUSE_LINUX/010-etc-hosts	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/010-etc-hosts	2008-03-24 19:33:27 +0000
@@ -0,0 +1,5 @@
+case "$MODE" in
+    after-install)
+	modify_hosts
+        ;;
+esac

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/010-mount-proc'
--- server/plugins/ltsp-build-client/SUSE_LINUX/010-mount-proc	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/010-mount-proc	2008-03-24 19:34:03 +0000
@@ -0,0 +1,1 @@
+#Taken care of by kiwi

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/010-set-base'
--- server/plugins/ltsp-build-client/SUSE_LINUX/010-set-base	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/010-set-base	2008-03-24 19:38:41 +0000
@@ -0,0 +1,10 @@
+case "$MODE" in
+    commandline)
+        add_option "base" "`eval_gettext "Set the default base install directory"`" "advanced" "true"
+        ;;
+    configure)
+        if [ -n "$option_base_value" ]; then
+            LTSNFSPATH="$option_base_value"
+        fi
+        ;;
+esac

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/010-set-chroot'
--- server/plugins/ltsp-build-client/SUSE_LINUX/010-set-chroot	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/010-set-chroot	2008-03-24 19:41:52 +0000
@@ -0,0 +1,1 @@
+#Not required

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/020-rootpath'
--- server/plugins/ltsp-build-client/SUSE_LINUX/020-rootpath	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/020-rootpath	2008-03-24 19:59:29 +0000
@@ -0,0 +1,12 @@
+#TODO: Handle this more gracefully
+case "$MODE" in
+    before-install)
+        ROOT=$LTSNFSPATH
+#        if [ -d $ROOT ] ; then
+#            echo "NOTE: Root directory $ROOT already exists, this will lead to problems, please remove it before trying again. Exiting."
+#            exit 0
+#        else
+#            mkdir -p "$ROOT"
+#        fi
+        ;;
+esac

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/030-update-sshkeys'
--- server/plugins/ltsp-build-client/SUSE_LINUX/030-update-sshkeys	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/030-update-sshkeys	2008-03-24 19:54:51 +0000
@@ -0,0 +1,1 @@
+#handled by kiwi-ltsp-setup script

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/035-update-kernels'
--- server/plugins/ltsp-build-client/SUSE_LINUX/035-update-kernels	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/035-update-kernels	2008-03-24 19:55:14 +0000
@@ -0,0 +1,1 @@
+#handled by kiwi-ltsp-setup

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/036-kiwi-ltsp-build-images'
--- server/plugins/ltsp-build-client/SUSE_LINUX/036-kiwi-ltsp-build-images	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/036-kiwi-ltsp-build-images	2008-03-24 20:11:20 +0000
@@ -0,0 +1,13 @@
+#!/bin/bash
+#
+# install a LTSP chroot to /srv/kiwi-ltsp-nfs for nfs and creates squashfs image for nbdroot in /srv/kiwi-ltsp
+# requires kiwi-desc-ltsp package installed
+#
+
+case "$MODE" in
+    install)
+        echo "creating images"
+	kiwi-ltsp-setup -l
+    ;;
+esac
+

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/037-kiwi-ltsp-configure-services'
--- server/plugins/ltsp-build-client/SUSE_LINUX/037-kiwi-ltsp-configure-services	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/037-kiwi-ltsp-configure-services	2008-03-24 20:13:09 +0000
@@ -0,0 +1,6 @@
+case "$MODE" in
+    finalization)
+	kiwi-ltsp-setup -c
+        ;;
+esac
+

=== added file 'server/plugins/ltsp-build-client/SUSE_LINUX/095-rootpass'
--- server/plugins/ltsp-build-client/SUSE_LINUX/095-rootpass	1970-01-01 00:00:00 +0000
+++ server/plugins/ltsp-build-client/SUSE_LINUX/095-rootpass	2008-03-24 20:01:42 +0000
@@ -0,0 +1,1 @@
+#root password set in kiwi's config.xml, default is linux
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.