|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Member
Iscritto dal: Mar 2010
Messaggi: 39
|
Avvio automatico demone
Ci sono diversi demoni (processi) che voglio eliminare dall'avvio automatico. Col vecchio init bastava modificare /etc/inittab. Ora pensavo di cancellare il file in /etc/init. Per esempio, per togliere dall'avvio automatico vsftpd do'
Codice:
$ sudo rm /etc/init/vsftpd.conf Grazie per ogni aiuto! Ps: ho ubuntu 10.4 |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Apr 2004
Messaggi: 9516
|
con quel comando togli solo un file di configurazione
intendi togliere il link in: /etc/rc...d/<nomeservizio> oppure: http://ubuntrucchi.wordpress.com/200...ne-automatica/ |
|
|
|
|
|
#3 |
|
Member
Iscritto dal: Mar 2010
Messaggi: 39
|
Il link che hai postato serve solo per le applicazioni di avvio di GNOME.
I vari demoni partono anche se faccio il login dal terminale virtuale. Ok però il link simbolico del processo da eliminare (smbd) non è in /etc/rcN.d/<processo> strano perchè si attiva comunque all'avvio... Però io non penso che quelli siano solo i file di configurazione. Questo è un pezzo della pagina man di init(5) Codice:
On startup, the Upstart init(8) daemon reads its job configuration from
the /etc/init directory, and watches for future changes using ino‐
tify(7).
Files in this directory must end in .conf and may also be present in
sub-directories.
Each file defines a single service or task, with the name taken from
its relative path within the directory without the extension. For
example a job defined in /etc/init/rc-sysinit.conf is named rc-sysinit,
while a job defined in /etc/init/net/apache.conf is named net/apache.
Io vorrei togliere uno di questi processi dall'esecuzione all'automatica senza precludere la possibilità di avviarlo successivamente. Come posso fare? Grazie di ogni risposta! --------------------EDIT------------------------- Ho cancellato il file /etc/init/processo.conf dopo averne fatto un backup Il processo non si attiva più all'avvio ma non riesco neppure ad avviarlo dopo. Lo script in /etc/init.d è un link di un'altro script che serve per la compatibilità fra init e upstart e riconduce al file in /etc/init (che ho cancellato). Ultima modifica di mghis : 08-08-2010 alle 00:07. |
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Apr 2004
Messaggi: 9516
|
provato a mettere nel .conf
Codice:
start on startup start on runlevel [23] ... |
|
|
|
|
|
#5 | |
|
Member
Iscritto dal: Mar 2010
Messaggi: 39
|
Quote:
Pare che funzioni ma anche il demone di stampa (cupsd) non si avvia all'accensione, dopo la modifica! Ultima modifica di mghis : 08-08-2010 alle 15:12. |
|
|
|
|
|
|
#6 |
|
Senior Member
Iscritto dal: Apr 2004
Messaggi: 9516
|
non credo che toccando apache.conf abbia influenzato cups.conf
che hai in cups.conf ? |
|
|
|
|
|
#7 |
|
Senior Member
Iscritto dal: Apr 2004
Messaggi: 9516
|
|
|
|
|
|
|
#8 |
|
Member
Iscritto dal: Mar 2010
Messaggi: 39
|
Vorrei stoppare smbd (samba), comunque con apache dovrebbe essere uguale.
/etc/init/cupsd.conf non c'è proprio. Ti posto /etc/init.d/cups Codice:
#! /bin/sh
### BEGIN INIT INFO
# Provides: cups
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start: $network avahi
# 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
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/cupsd
NAME=cupsd
PIDFILE=/var/run/cups/$NAME.pid
DESC="Common Unix Printing System"
unset TMPDIR
test -x $DAEMON || exit 0
mkdir -p /var/run/cups/certs
if [ -r /etc/default/cups ]; then
. /etc/default/cups
fi
. /lib/lsb/init-functions
# Get the timezone set.
if [ -z "$TZ" -a -e /etc/timezone ]; then
TZ=`cat /etc/timezone`
export TZ
fi
restart_xprint() {
if [ -n "$success" ] && [ -x /etc/init.d/xprint ]; then
invoke-rc.d xprint force-reload || true
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_begin_msg "Starting $DESC: $NAME"
chown root:lpadmin /usr/share/ppd/custom 2>/dev/null || true
chmod 3775 /usr/share/ppd/custom 2>/dev/null || true
mkdir -p `dirname "$PIDFILE"`
if [ "$LOAD_LP_MODULE" = "yes" -a -f /usr/lib/cups/backend/parallel \
-a -f /proc/devices -a -f /proc/modules -a -x /sbin/modprobe ]; then
modprobe -q -b lp || true
modprobe -q -b ppdev || true
fi
start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --exec $DAEMON && success=1
coldplug_usb_printers
log_end_msg $?
restart_xprint
;;
stop)
log_begin_msg "Stopping $DESC: $NAME"
start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME && success=1
log_end_msg $?
restart_xprint
;;
reload|force-reload)
log_begin_msg "Reloading $DESC: $NAME"
start-stop-daemon --stop --quiet --pidfile $PIDFILE --name $NAME --signal 1 && success=1
log_end_msg $?
restart_xprint
;;
restart)
log_begin_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 && success=1
fi
log_end_msg $?
restart_xprint
;;
status)
echo -n "Status of $DESC: "
if [ ! -r "$PIDFILE" ]; then
echo "$NAME is not running."
exit 3
fi
if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
echo "$NAME is running."
exit 0
else
echo "$NAME is not running but $PIDFILE exists."
exit 1
fi
;;
*)
N=/etc/init.d/${0##*/}
echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac
exit 0
|
|
|
|
|
|
#9 |
|
Senior Member
Iscritto dal: Apr 2004
Messaggi: 9516
|
sudo initctl stop smbd
sudo initctl stop nmbd non va? p.s. cups non lo so |
|
|
|
|
|
#10 |
|
Member
Iscritto dal: Mar 2010
Messaggi: 39
|
si (il secondo comando sì, il primo no) però io vorrei che non si attivassero all'accensione del pc...
grazie per ogni ulteriore aiuto |
|
|
|
|
|
#11 |
|
Senior Member
Iscritto dal: Apr 2004
Messaggi: 9516
|
per rendere persistente la cosa
nei rispettivi job: /etc/init/smbd.conf e nmbd.conf modifichi da: stop on runlevel [!2345] a stop on runlevel [2345] |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 19:48.




















