1 |
michel |
1.1 |
diff -urN e-smith-LPRng-2.6.0.old/createlinks e-smith-LPRng-2.6.0/createlinks |
2 |
|
|
--- e-smith-LPRng-2.6.0.old/createlinks 2020-11-11 11:08:42.000000000 +0400 |
3 |
|
|
+++ e-smith-LPRng-2.6.0/createlinks 2020-11-12 00:26:29.000000000 +0400 |
4 |
|
|
@@ -51,9 +51,25 @@ |
5 |
|
|
# actions for bootstrap-console-save event |
6 |
|
|
#-------------------------------------------------- |
7 |
|
|
|
8 |
|
|
-for my $event (qw(bootstrap-console-save lpd-update)) |
9 |
|
|
-{ |
10 |
|
|
- templates2events("/etc/lpd/lpd.perms", $event); |
11 |
|
|
- templates2events("/etc/printcap", $event); |
12 |
|
|
- event_link("printer-create", $event, "15") |
13 |
|
|
-} |
14 |
|
|
+my $event = "bootstrap-console-save"; |
15 |
|
|
+ |
16 |
|
|
+templates2events("/etc/lpd/lpd.perms", $event); |
17 |
|
|
+templates2events("/etc/printcap", $event); |
18 |
|
|
+event_link("printer-create", $event, "15"); |
19 |
|
|
+ |
20 |
|
|
+#-------------------------------------------------- |
21 |
|
|
+# actions for e-smith-LPRng-update event |
22 |
|
|
+#-------------------------------------------------- |
23 |
|
|
+ |
24 |
|
|
+my $event = "e-smith-LPRng-update"; |
25 |
|
|
+ |
26 |
|
|
+templates2events("/etc/lpd/lpd.perms", $event); |
27 |
|
|
+templates2events("/etc/printcap", $event); |
28 |
|
|
+safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/lpd"); |
29 |
|
|
+ |
30 |
|
|
+ |
31 |
|
|
+# Make service statup symlinks |
32 |
|
|
+safe_symlink("../daemontools", "root/etc/rc.d/init.d/supervise/lpd"); |
33 |
|
|
+# remove for systemd |
34 |
|
|
+#safe_symlink("/etc/rc.d/init.d/e-smith-service", "root/etc/rc.d/rc7.d/S60lpd"); |
35 |
|
|
+safe_symlink("/var/service/lpd", "root/service/lpd"); |
36 |
|
|
diff -urN e-smith-LPRng-2.6.0.old/root/usr/lib/systemd/system/lpd.service e-smith-LPRng-2.6.0/root/usr/lib/systemd/system/lpd.service |
37 |
|
|
--- e-smith-LPRng-2.6.0.old/root/usr/lib/systemd/system/lpd.service 2020-11-11 11:08:42.000000000 +0400 |
38 |
|
|
+++ e-smith-LPRng-2.6.0/root/usr/lib/systemd/system/lpd.service 2020-11-11 23:15:50.000000000 +0400 |
39 |
|
|
@@ -1,11 +1,14 @@ |
40 |
|
|
[Unit] |
41 |
|
|
-Description=lpd |
42 |
|
|
-#After=network.target |
43 |
|
|
+Description=lpd, LPRng print spool |
44 |
|
|
+After=network.target |
45 |
|
|
|
46 |
|
|
[Service] |
47 |
|
|
-Type=simple |
48 |
|
|
-ExecStart=/usr/lib/systemd/systemd-lpd start |
49 |
|
|
-ExecReload=/usr/lib/systemd/systemd-lpd reload |
50 |
|
|
+Type=oneshot |
51 |
|
|
+ExecStartPre=/sbin/e-smith/service-status lpd |
52 |
|
|
+ExecStart=/usr/bin/sv u /service/lpd |
53 |
|
|
+ExecStop=/usr/bin/sv stop /service/lpd |
54 |
|
|
+ExecReload=/usr/bin/sv t /service/lpd |
55 |
|
|
+RemainAfterExit=yes |
56 |
|
|
|
57 |
|
|
[Install] |
58 |
|
|
WantedBy=sme-server.target |
59 |
|
|
diff -urN e-smith-LPRng-2.6.0.old/root/usr/lib/systemd/systemd-lpd e-smith-LPRng-2.6.0/root/usr/lib/systemd/systemd-lpd |
60 |
|
|
--- e-smith-LPRng-2.6.0.old/root/usr/lib/systemd/systemd-lpd 2020-11-11 11:08:42.000000000 +0400 |
61 |
|
|
+++ e-smith-LPRng-2.6.0/root/usr/lib/systemd/systemd-lpd 1970-01-01 04:00:00.000000000 +0400 |
62 |
|
|
@@ -1,67 +0,0 @@ |
63 |
|
|
-#!/bin/sh |
64 |
|
|
-PREFIX=/usr |
65 |
|
|
-LPD_PATH="/usr/sbin/lpd" |
66 |
|
|
-INSTALL="/usr/bin/install -c" |
67 |
|
|
-LPD_PERMS_PATH="/etc/lpd/lpd.perms" |
68 |
|
|
-LPD_CONF_PATH="/etc/lpd/lpd.conf" |
69 |
|
|
-PRINTCAP_PATH="/etc/printcap" |
70 |
|
|
-SYSCONFDIR=/etc |
71 |
|
|
-DATADIR=/usr/share/LPRng |
72 |
|
|
-SBINDIR=/usr/sbin |
73 |
|
|
-FILTER_DIR=/usr/libexec/filters |
74 |
|
|
-LOCKFILE="/var/run/lpd" |
75 |
|
|
-CONFIG_SUBDIR=lpd |
76 |
|
|
-PSHOWALL="-ax" |
77 |
|
|
-VERSION=3.8.35 |
78 |
|
|
-INIT= |
79 |
|
|
-MANDIR=/usr/share/man |
80 |
|
|
- |
81 |
|
|
-#!/bin/sh |
82 |
|
|
-# |
83 |
|
|
-# lpd This shell script takes care of starting and stopping \ |
84 |
|
|
-# lpd (printer daemon). |
85 |
|
|
-# |
86 |
|
|
-# from /etc/rc.d/init.d/lpd |
87 |
|
|
-# |
88 |
|
|
-# description: lpd is the print daemon required for lpr to work properly. \ |
89 |
|
|
-# It is basically a server that arbitrates print jobs to printer(s). |
90 |
|
|
-# processname: ${LPD_PATH} |
91 |
|
|
-# config: /etc/printcap |
92 |
|
|
- |
93 |
|
|
-RETVAL=0 |
94 |
|
|
- |
95 |
|
|
-start () { |
96 |
|
|
- # Is this a printconf system? |
97 |
|
|
- if [[ -x /usr/sbin/printconf-backend ]]; then |
98 |
|
|
- # run printconf-backend to rebuild printcap and spools |
99 |
|
|
- if ! /usr/sbin/printconf-backend ; then |
100 |
|
|
- # If the backend fails, we dont start no printers defined |
101 |
|
|
- echo -n $"No Printers Defined" |
102 |
|
|
- fi |
103 |
|
|
- fi |
104 |
|
|
- if ! [ -e /etc/printcap ] ; then |
105 |
|
|
- echo -n $"No 'printcap' found" |
106 |
|
|
- return 1 |
107 |
|
|
- fi |
108 |
|
|
- # run checkpc to fix whatever lpd would complain about |
109 |
|
|
- ${SBINDIR}/checkpc -f |
110 |
|
|
- # start daemon |
111 |
|
|
- ${LPD_PATH} -F |
112 |
|
|
- RETVAL=$? |
113 |
|
|
-} |
114 |
|
|
- |
115 |
|
|
-# See how we were called. |
116 |
|
|
-case "$1" in |
117 |
|
|
- start) |
118 |
|
|
- start |
119 |
|
|
- ;; |
120 |
|
|
- reload) |
121 |
|
|
- killall ${LPD_PATH} -HUP |
122 |
|
|
- RETVAL=$? |
123 |
|
|
- ;; |
124 |
|
|
- *) |
125 |
|
|
- echo $"Usage: $0 {start|reload}" |
126 |
|
|
- RETVAL=1 |
127 |
|
|
-esac |
128 |
|
|
- |
129 |
|
|
-exit $RETVAL |
130 |
|
|
diff -urN e-smith-LPRng-2.6.0.old/root/usr/lib/systemd/system-preset/80-koozali-LPRng.preset e-smith-LPRng-2.6.0/root/usr/lib/systemd/system-preset/80-koozali-LPRng.preset |
131 |
|
|
--- e-smith-LPRng-2.6.0.old/root/usr/lib/systemd/system-preset/80-koozali-LPRng.preset 1970-01-01 04:00:00.000000000 +0400 |
132 |
|
|
+++ e-smith-LPRng-2.6.0/root/usr/lib/systemd/system-preset/80-koozali-LPRng.preset 2020-11-11 23:08:05.000000000 +0400 |
133 |
|
|
@@ -0,0 +1 @@ |
134 |
|
|
+enable lpd.service |
135 |
|
|
diff -urN e-smith-LPRng-2.6.0.old/root/var/service/lpd/run e-smith-LPRng-2.6.0/root/var/service/lpd/run |
136 |
|
|
--- e-smith-LPRng-2.6.0.old/root/var/service/lpd/run 1970-01-01 04:00:00.000000000 +0400 |
137 |
|
|
+++ e-smith-LPRng-2.6.0/root/var/service/lpd/run 2004-12-13 23:29:26.000000000 +0400 |
138 |
|
|
@@ -0,0 +1,2 @@ |
139 |
|
|
+#! /bin/sh |
140 |
|
|
+exec /usr/sbin/lpd -F |