Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 361727 - /etc/init.d/sshd does not perform restart
Summary: /etc/init.d/sshd does not perform restart
Status: RESOLVED DUPLICATE of bug 354785
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-03 00:03 UTC by damage
Modified: 2011-04-04 15:57 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description damage 2011-04-03 00:03:56 UTC
Sometime the init script of the openssh daemon does not perform a restart. It just ends with an error (!!) during the stop action. No error message is provided.

I figured out that the stop function tries to find the running ssh daemon through /proc/<sshd pid>/exe. exe should be an link to formerly started ssh daemon. But after updating the net-misc/openssh package the link looks like:

exe -> /var/tmp/portage/net-misc/openssh-5.8_p1-r1/image/usr/sbin/sshd (deleted)

That why the start-stop-daemon program is ending with an error. To be able to restart the ssh daemon I removed the '--exec "${SSHD_BINARY}"' option from the start-stop-daemon program. I think this option is provided to sure to restart the ssh daemon and not any other process which accidentally has the pid provided by /var/run/sshd.pid.

Why is the link that messed up? Why exe linking against /var/tmp/*? What can we/I do to be able to use the init.d script after an update.

Sorry if this is a dup. I searched but I was unable to find a corresponding bug. I hope I am not the only guy with that problem ;)

Reproducible: Always

Steps to Reproduce:
1. emerge net-misc/openssh
2. update to another net-misc/openssh version
3. /etc/init.d/sshd restart
Actual Results:  
sshd does not restart

Expected Results:  
sshd should be restarted

Portage 2.1.9.42 (default/linux/amd64/10.0, gcc-4.4.5, glibc-2.11.3-r0, 2.6.34-gentoo-r12 x86_64)
=================================================================
System uname: Linux-2.6.34-gentoo-r12-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4800+-with-gentoo-1.12.14
Timestamp of tree: Fri, 01 Apr 2011 23:30:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.1.2, 4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5.2/ext-active/ /etc/php/cgi-php5.2/ext-active/ /etc/php/cli-php5.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -msse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.manitu.net/gentoo"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://mirror.manitu.net/gentoo-portage"
USE="3dnow 3dnowext acl amd64 apache2 bash-completion bzip2 clamav cli cracklib crypt ctype cxx daemon dri enscript exif fam fortran ftp gd gdbm geoip gif gpm hddtemp iconv imagemagick inifile jpeg lm_sensors logrotate math mmx mmxext modules mpm-worker mudflap multilib mysql mysqli ncurses network-cron nls nptl nptlonly openmp pam pcre perl php png pppd python readline session slang snmp soap sockets sqlite sse sse2 ssl suexec sysfs syslog tcpd threads tidy truetype unicode vhosts vim-syntax virtual-users xml xmlreader xmlwriter xorg zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_dbd authn_default authn_file authz_default authz_host autoindex dav dav_fs dav_lock deflate dir expires headers include info log_config logio mime mime_magic negotiation proxy proxy_connect proxy_http rewrite setenvif so speling status vhost_alias authz_dbm authz_groupfile authz_owner authz_user filter unique_id dbd cgi cgid proxy_ajp" APACHE2_MPMS="worker" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


currently used: net-misc/openssh-5.8_p1-r1
Comment 1 SpanKY gentoo-dev 2011-04-04 15:57:34 UTC

*** This bug has been marked as a duplicate of bug 354785 ***