cups και grub - προβλήματα

...εγκαταστάσεις, αναβαθμίσεις, διαχείριση partitions, boot-loader, κλπ

Συντονιστής: adem1

Κανόνες Δ. Συζήτησης
Στην ενότητα αυτή γράφουμε θέματα/ προβλήματα μόνο για το UBUNTU ή τα παράγωγά του.

Re: cups και grub - προβλήματα

Δημοσίευσηαπό Maras » 08 Φεβ 2018, 16:18

Δώσε τα αποτελέσματα των εντολών
Κώδικας: Επιλογή όλων
ls -l /etc/rc*/*cups

και πάνε δες όλα αυτά τα αρχεία από την λίστα που θα σου βγάλει, αν είναι άδεια.
επίσης δώσε το αποτέλεσμα της εντολής
Κώδικας: Επιλογή όλων
cat -n /etc/init.d/cups
“Long is the way, and hard, that out of hell leads up to light.”
Άβαταρ μέλους
Maras
saintTUX
saintTUX
 
Δημοσιεύσεις: 1580
Εγγραφή: 25 Ιούλ 2017, 12:49
Εκτύπωση

Re: cups και grub - προβλήματα

Δημοσίευσηαπό dimitris111 » 09 Φεβ 2018, 12:54

Κώδικας: Επιλογή όλων
ls -l /etc/rc*/*cups
lrwxrwxrwx 1 root root 14 Δεκ 14 18:25 /etc/rc0.d/K01cups -> ../init.d/cups
lrwxrwxrwx 1 root root 14 Ιαν 3 2017 /etc/rc1.d/K01cups -> ../init.d/cups
lrwxrwxrwx 1 root root 14 Δεκ 14 18:25 /etc/rc2.d/K01cups -> ../init.d/cups
lrwxrwxrwx 1 root root 14 Σεπ 16 10:44 /etc/rc2.d/S05cups -> ../init.d/cups
lrwxrwxrwx 1 root root 14 Δεκ 6 20:23 /etc/rc2.d/S81cups -> ../init.d/cups
lrwxrwxrwx 1 root root 14 Δεκ 14 18:25 /etc/rc3.d/K01cups -> ../init.d/cups
lrwxrwxrwx 1 root root 14 Σεπ 16 10:44 /etc/rc3.d/S05cups -> ../init.d/cups
lrwxrwxrwx 1 root root 14 Δεκ 6 20:23 /etc/rc3.d/S81cups -> ../init.d/cups
lrwxrwxrwx 1 root root 14 Δεκ 14 18:25 /etc/rc4.d/S99cups -> ../init.d/cups
lrwxrwxrwx 1 root root 14 Δεκ 14 18:25 /etc/rc5.d/K01cups -> ../init.d/cups
lrwxrwxrwx 1 root root 14 Σεπ 16 10:44 /etc/rc5.d/S05cups -> ../init.d/cups
lrwxrwxrwx 1 root root 14 Δεκ 6 20:23 /etc/rc5.d/S81cups -> ../init.d/cups


Τα παραπάνω αρχεία υπάρχουν και είναι γεμάτα.


Κώδικας: Επιλογή όλων
cat -n /etc/init.d/cups
1 #!/bin/sh
2 #
3 # Startup/shutdown script for CUPS.
4 #
5 # Copyright 2007-2013 by Apple Inc.
6 # Copyright 1997-2007 by Easy Software Products, all rights reserved.
7 #
8 # These coded instructions, statements, and computer programs are the
9 # property of Apple Inc. and are protected by Federal copyright
10 # law. Distribution and use rights are outlined in the file "LICENSE.txt"
11 # which should have been included with this file. If this file is
12 # file is missing or damaged, see the license at "http://www.cups.org/".
13 #
14
15 #### OS-Dependent Information
16
17 #
18 # Linux chkconfig stuff:
19 #
20 # chkconfig: 235 99 00
21 # description: Startup/shutdown script for CUPS.
22 #
23
24 #
25 # NetBSD 1.5+ rcorder script lines. The format of the following two
26 # lines is very strict -- please don't add additional spaces!
27 #
28 # PROVIDE: cups
29 # REQUIRE: DAEMON
30 #
31
32
33 #### OS-Dependent Configuration
34
35 case "`uname`" in
36 *BSD*)
37 IS_ON=:
38 ECHO=echo
39 ECHO_OK=:
40 ECHO_ERROR=:
41 ;;
42
43 Darwin*)
44 . /etc/rc.common
45
46 if test "${CUPS:=-YES-}" = "-NO-"; then
47 exit 0
48 fi
49
50 IS_ON=:
51 ECHO=ConsoleMessage
52 ECHO_OK=:
53 ECHO_ERROR=:
54 ;;
55
56 Linux*)
57 IS_ON=/bin/true
58 if test -f /etc/init.d/functions; then
59 . /etc/init.d/functions
60 ECHO=echo
61 ECHO_OK="echo_success"
62 ECHO_ERROR="echo_failure"
63 else
64 ECHO=echo
65 ECHO_OK=:
66 ECHO_ERROR=:
67 fi
68 ;;
69
70 *)
71 IS_ON=/bin/true
72 ECHO=echo
73 ECHO_OK=:
74 ECHO_ERROR=:
75 ;;
76 esac
77
78 #### OS-Independent Stuff
79
80 #
81 # Set the timezone, if possible... This allows the scheduler and
82 # all child processes to know the local timezone when reporting
83 # dates and times to the user. If no timezone information is
84 # found, then Greenwich Mean Time (GMT) will probably be used.
85 #
86
87 for file in /etc/TIMEZONE /etc/rc.config /etc/sysconfig/clock; do
88 if test -f $file; then
89 . $file
90 fi
91 done
92
93 if test "x$ZONE" != x; then
94 TZ="$ZONE"
95 fi
96
97 if test "x$TIMEZONE" != x; then
98 TZ="$TIMEZONE"
99 fi
100
101 if test "x$TZ" != x; then
102 export TZ
103 fi
104
105 #
106 # Don't use TMPDIR environment variable from init script, as that can
107 # cause cupsd to set TempDir to a user's temporary directory instead
108 # of the default...
109 #
110
111 unset TMPDIR
112
113
114 #
115 # Make sure we have the standard program directories in the path
116 # since some operating systems don't provide a standard path on boot-up...
117 #
118
119 if test "x$PATH" = x; then
120 PATH="/bin:/usr/bin:/sbin:/usr/sbin"
121 else
122 PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH"
123 fi
124
125 export PATH
126
127 #
128 # See if the CUPS server (cupsd) is running...
129 #
130
131 case "`uname`" in
132 SunOS*)
133 pid=`ps -e | nawk '{if (match($4, ".*/cupsd$") || $4 == "cupsd") print $1}'`
134 ;;
135 Linux* | *BSD* | Darwin*)
136 pid=`ps ax | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
137 ;;
138 *)
139 pid=""
140 ;;
141 esac
142
143 #
144 # Start or stop the CUPS server based upon the first argument to the script.
145 #
146
147 case $1 in
148 start | restart | reload)
149 if $IS_ON cups; then
150 if test -x /sbin/portrelease; then
151 /sbin/portrelease cups
152 fi
153
154 if test "$pid" != ""; then
155 kill -HUP $pid
156 else
157 prefix=/
158 exec_prefix=/usr
159 /usr/sbin/cupsd
160 if test $? != 0; then
161 $ECHO_FAIL
162 $ECHO "cups: unable to $1 scheduler."
163 exit 1
164 fi
165 fi
166 $ECHO_OK
167 $ECHO "cups: ${1}ed scheduler."
168 fi
169 ;;
170
171 stop)
172 if test "$pid" != ""; then
173 kill $pid
174 $ECHO_OK
175 $ECHO "cups: stopped scheduler."
176 fi
177 ;;
178
179 status)
180 if test "$pid" != ""; then
181 echo "cups: scheduler is running."
182 else
183 echo "cups: scheduler is not running."
184 fi
185 ;;
186
187 *)
188 echo "Usage: cups {reload|restart|start|status|stop}"
189 exit 1
190 ;;
191 esac
192
193 #
194 # Exit with no errors.
195 #
196
197 exit 0
Γνώσεις ⇛ Χ Linux: ok (desktop) ┃Console Linux: Λίγες ┃ Προγραμματισμός: Λίγο ┃ Αγγλικά: Καλά

Λειτουργικό ⇛ Ubuntu 16.04 ┃ 64-bit ┃
Intel® Pentium(R) Dual CPU T3200 @ 2.00GHz × 2 ┃ Memory 4 GiB ┃ Καρτ. Γραφ. Άγνωστη
(Lenovo 3000-N500 laptop)
dimitris111
babeTUX
babeTUX
 
Δημοσιεύσεις: 12
Εγγραφή: 28 Μάιος 2014, 18:05
Εκτύπωση

Re: cups και grub - προβλήματα

Δημοσίευσηαπό Maras » 09 Φεβ 2018, 20:36

Τράβηξε backup των αρχείων σου, και δοκίμασε τα εξής
Δές τη λίστα των πακέτων που έχεις εγκατεστημένα και σχετίζονται με το Cups και αφαίρεσε τα ένα ένα
Κώδικας: Επιλογή όλων
dpkg -l | grep cups

και
Κώδικας: Επιλογή όλων
sudo apt --purge remove όνομα_πακέτου

Πώς εγκατέστησες το Cups? Και τι πείραξες? Το τελευταία script που ανέβασες (/etc/init.d/cups), που ανήκει στο πακέτο cups-daemon είναι διαφορετικό από αυτό που υπάρχει στα επίσημα αποθετήρια για την 16.04 έκδοση του Ubuntu. To script που ανέβασες το έχω εγώ για τα Slackware. στο ubuntu το script είναι κάπως έτσι :
Κώδικας: Επιλογή όλων
#! /bin/sh
### BEGIN INIT INFO
# Provides: cups
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start: $network avahi-daemon slapd nslcd
# Should-Stop: $network
# X-Start-Before: samba
# X-Stop-After: samba
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: CUPS Printing spooler and server
# Description: Manage the CUPS Printing spooler and server;
# make it's web interface accessible on http://localhost:631/
### END INIT INFO

# Author: Debian Printing Team <debian-printing@lists.debian.org>

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/cupsd
NAME=cupsd
PIDFILE=/run/cups/$NAME.pid
DESC="Common Unix Printing System"
SCRIPTNAME=/etc/init.d/cups

unset TMPDIR

# Exit if the package is not installed
test -x $DAEMON || exit 0

mkdir -p /run/cups/certs
[ -x /sbin/restorecon ] && /sbin/restorecon -R /run/cups

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions

# Get the timezone set.
if [ -z "$TZ" -a -e /etc/timezone ]; then
TZ=`cat /etc/timezone`
export TZ
fi

coldplug_usb_printers() {
if type udevadm > /dev/null 2>&1 && [ -x /lib/udev/udev-configure-printer ]; then
for printer in `udevadm trigger --verbose --dry-run --subsystem-match=usb \
--attr-match=bInterfaceClass=07 --attr-match=bInterfaceSubClass=01 2>/dev/null || true; \
udevadm trigger --verbose --dry-run --subsystem-match=usb \
--sysname-match='lp[0-9]*' 2>/dev/null || true`; do
/lib/udev/udev-configure-printer add "${printer#/sys}"
done
fi
}

case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"

mkdir -p `dirname "$PIDFILE"`
start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --exec $DAEMON
status=$?
[ $status = 0 ] && coldplug_usb_printers
log_end_msg $status
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME
status=$?
log_end_msg $status
;;
reload|force-reload)
log_daemon_msg "Reloading $DESC" "$NAME"
start-stop-daemon --stop --quiet --pidfile $PIDFILE --name $NAME --signal 1
status=$?
log_end_msg $status
;;
restart)
log_daemon_msg "Restarting $DESC" "$NAME"
if start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME; then
start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec $DAEMON
fi
status=$?
log_end_msg $status
;;
status)
status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $?
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2
exit 3
;;
esac

exit 0

Στην θέση σου θα δοκίμαζα να αφαιρέσω και να ξαναβάλω τον cups-daemon πρίν δοκιμάσω να τα αφαιρέσω όλα.
Επίσης φαίνεται ότι υπάρχει πρόβλημα και στο udev σου, το οποίο είναι critical πακέτο.
Σαν τελευταίο θα δοκίμαζα να κάνω reinstall to udev, θέλει προσοχή όμως!!! Για να μην μείνει το σύστημα σου κρεμασμένο και αναγκαστείς να κάνεις reinstall τα Ubuntu. Μπορείς να το κατεβάσεις σαν deb πακέτο από εδώ https://packages.ubuntu.com/xenial/udev, ανάλογα με την αρχιτεκτονική σου και να το εγκαταστήσεις με το dpkg. Πρώτα κατέβασε το και μετά αφαίρεσε το, αν δοκιμάσεις να το κάνεις.
“Long is the way, and hard, that out of hell leads up to light.”
Άβαταρ μέλους
Maras
saintTUX
saintTUX
 
Δημοσιεύσεις: 1580
Εγγραφή: 25 Ιούλ 2017, 12:49
Εκτύπωση

Re: cups και grub - προβλήματα

Δημοσίευσηαπό dimitris111 » 23 Φεβ 2018, 22:04

Ευχαριστώ για την βοήθεια.
Προσπάθησα να κάνω απεγκατάσταση για το CUPS αλλά κολλούσε συνέχει σε κάποιο στοιχείο που δεν έβρισκε.
Έτσι, αφού είχα πάρει backup τα αρχεία μου πέρασα πάλι το 16.04 όλα καλά.
P.S. Είπα να δοκιμάσω και το 17.10 -ούτως ή άλλως σκόπευα να βάλω το 18.04 σε κανένα εξάμηνο αλλά διάβασα για προβλήματα σε bios της lenovo και έτσι έβαλα πάλι το 16.04.
Γνώσεις ⇛ Χ Linux: ok (desktop) ┃Console Linux: Λίγες ┃ Προγραμματισμός: Λίγο ┃ Αγγλικά: Καλά

Λειτουργικό ⇛ Ubuntu 16.04 ┃ 64-bit ┃
Intel® Pentium(R) Dual CPU T3200 @ 2.00GHz × 2 ┃ Memory 4 GiB ┃ Καρτ. Γραφ. Άγνωστη
(Lenovo 3000-N500 laptop)
dimitris111
babeTUX
babeTUX
 
Δημοσιεύσεις: 12
Εγγραφή: 28 Μάιος 2014, 18:05
Εκτύπωση

Προηγούμενη

Επιστροφή στο Λειτουργικό Σύστημα