summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--remote/modules/cups/cups.build19
-rw-r--r--remote/modules/cups/cups.conf8
-rw-r--r--remote/modules/cups/cups.conf.ubuntu8
-rw-r--r--remote/modules/cups/data/etc/systemd/system/cups.service8
l---------remote/modules/cups/data/etc/systemd/system/network.target.wants/cups.service1
-rw-r--r--remote/modules/printergui/printergui.build19
-rw-r--r--remote/modules/printergui/printergui.conf7
-rw-r--r--remote/modules/printergui/printergui.conf.ubuntu6
-rwxr-xr-xremote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt11
-rwxr-xr-xremote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx2
l---------remote/targets/stage32/cups1
l---------remote/targets/stage32/printergui1
12 files changed, 90 insertions, 1 deletions
diff --git a/remote/modules/cups/cups.build b/remote/modules/cups/cups.build
new file mode 100644
index 00000000..0238f1bd
--- /dev/null
+++ b/remote/modules/cups/cups.build
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+fetch_source() {
+ :
+}
+
+build() {
+ COPYLIST="list_dpkg_output"
+ [ -e "$COPYLIST" ] && rm "$COPYLIST"
+
+ list_packet_files >> "$COPYLIST"
+ tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}"
+
+}
+
+post_copy() {
+ :
+}
+
diff --git a/remote/modules/cups/cups.conf b/remote/modules/cups/cups.conf
new file mode 100644
index 00000000..8c30a08b
--- /dev/null
+++ b/remote/modules/cups/cups.conf
@@ -0,0 +1,8 @@
+REQUIRED_BINARIES="
+ cupsd
+"
+REQUIRED_DIRECTORIES="
+ /usr/lib/cups/
+ /usr/share/cups/
+"
+REQUIRED_FILES=""
diff --git a/remote/modules/cups/cups.conf.ubuntu b/remote/modules/cups/cups.conf.ubuntu
new file mode 100644
index 00000000..6eeb9aeb
--- /dev/null
+++ b/remote/modules/cups/cups.conf.ubuntu
@@ -0,0 +1,8 @@
+REQUIRED_INSTALLED_PACKAGES="
+ cups
+ cups-daemon
+"
+REQUIRED_CONTENT_PACKAGES="
+ cups
+ cups-daemon
+"
diff --git a/remote/modules/cups/data/etc/systemd/system/cups.service b/remote/modules/cups/data/etc/systemd/system/cups.service
new file mode 100644
index 00000000..38beff56
--- /dev/null
+++ b/remote/modules/cups/data/etc/systemd/system/cups.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Common Unix Printing System
+Requires=network.target graphical.target
+After=network.target
+Before=graphical.target
+
+[Service]
+ExecStart=/usr/sbin/cupsd -f
diff --git a/remote/modules/cups/data/etc/systemd/system/network.target.wants/cups.service b/remote/modules/cups/data/etc/systemd/system/network.target.wants/cups.service
new file mode 120000
index 00000000..d8578ebb
--- /dev/null
+++ b/remote/modules/cups/data/etc/systemd/system/network.target.wants/cups.service
@@ -0,0 +1 @@
+../cups.service \ No newline at end of file
diff --git a/remote/modules/printergui/printergui.build b/remote/modules/printergui/printergui.build
new file mode 100644
index 00000000..b414230c
--- /dev/null
+++ b/remote/modules/printergui/printergui.build
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+fetch_source() {
+ git clone "${REQUIRED_GIT}" src
+}
+
+build() {
+ local SRCDIR="${MODULE_DIR}/src/"
+
+ mkdir -p "$MODULE_BUILD_DIR/opt/openslx/bin"
+ cd "${MODULE_BUILD_DIR}/opt/openslx/bin" || perror "Cpdspofj not cd!"
+ pinfo "Running qmake"
+ qmake-qt4 "$SRCDIR/src/printergui.pro" -r -spec linux-g++ || perror "'qmake' failed."
+ pinfo "Running make"
+ make || perror "'make' failed."
+}
+post_copy() {
+ chmod a+rwt "${TARGET_BUILD_DIR}/var/spool/STANDARD"
+}
diff --git a/remote/modules/printergui/printergui.conf b/remote/modules/printergui/printergui.conf
new file mode 100644
index 00000000..26203a80
--- /dev/null
+++ b/remote/modules/printergui/printergui.conf
@@ -0,0 +1,7 @@
+REQUIRED_GIT="git://git.openslx.org/openslx-ng/printergui.git"
+REQUIRED_BINARIES="
+ printergui
+"
+REQUIRED_SYSTEM_FILES="
+"
+
diff --git a/remote/modules/printergui/printergui.conf.ubuntu b/remote/modules/printergui/printergui.conf.ubuntu
new file mode 100644
index 00000000..3dc662fd
--- /dev/null
+++ b/remote/modules/printergui/printergui.conf.ubuntu
@@ -0,0 +1,6 @@
+REQUIRED_INSTALLED_PACKAGES="
+libcups2-dev
+"
+REQUIRED_CONTENT_PACKAGES="
+libcups2-dev
+"
diff --git a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
index b0d01738..10a6283d 100755
--- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
+++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
@@ -427,6 +427,17 @@ if [ "$vtflag" = "1" -a -n "$kvm_module" ]; then
modprobe "$kvm_module"
fi
+# # # # # # Start printer daemon # # # # # # #
+USER="$(whoami)"
+SPOOLDIR="/var/spool"
+QUEUE="STANDARD"
+
+# Start the lpdaemon listening on the given port
+busybox tcpsvd -E 0.0.0.0 5515 \
+ busybox lpd "$SPOOLDIR" \
+ sh -c "printergui $USER $SPOOOLDIR/$QUEUE/\$DATAFILE" &
+
+
# Copy guest configuration (with added information) config.xml to be accessed
# via virtual floppy
cp "$xmlfile" "/opt/openslx/etc/vmchooser/fd-loop/config.xml"
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx
index c2dbfbb4..178e3611 100755
--- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx
+++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx
@@ -135,7 +135,7 @@ case "$1" in
# Port redirection for printing
iptables -A INPUT -i br0 -p tcp --dport 515 -j DROP
iptables -A INPUT -i br0 -p tcp --dport 5515 -j DROP
- iptables -t nat -A PREROUTING -p tcp --dport 515 -j DNAT --to-destination 127.0.0.1:5515
+ iptables -t nat -A PREROUTING -p tcp --dport 515 -j REDIRECT --to-port 5515
fi
;;
diff --git a/remote/targets/stage32/cups b/remote/targets/stage32/cups
new file mode 120000
index 00000000..0ff7101d
--- /dev/null
+++ b/remote/targets/stage32/cups
@@ -0,0 +1 @@
+../../modules/cups \ No newline at end of file
diff --git a/remote/targets/stage32/printergui b/remote/targets/stage32/printergui
new file mode 120000
index 00000000..6ccbb628
--- /dev/null
+++ b/remote/targets/stage32/printergui
@@ -0,0 +1 @@
+../../modules/printergui \ No newline at end of file