Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 136350 - /etc/init.d/halt.sh no longer inherits /sbin/rc's env
Summary: /etc/init.d/halt.sh no longer inherits /sbin/rc's env
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
: 137267 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-10 18:53 UTC by Paul Bredbury
Modified: 2006-06-19 10:08 UTC (History)
3 users (show)

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 Paul Bredbury 2006-06-10 18:53:13 UTC
Hi, the command "grep try /lib/rcscripts/addons/*" shows 5 lines which begin with "try", e.g.:

udev-start.sh:  try mount -n ${mntcmd}
udev-stop.sh:  try mv -f "${device_tarball}" /lib/udev-state/devices.tar.bz2

However, "try" does not appear to be a valid bash command (in bash-3.1_p16), and error messages to that effect fly by during startup and shutdown.
Comment 1 SpanKY gentoo-dev 2006-06-11 04:00:03 UTC
it's defined in baselayout in /sbin/rc
Comment 2 Paul Bredbury 2006-06-11 06:46:44 UTC
At shutdown I see:

line 54: try: command not found
line 55: try: command not found

These refer to the commands in /lib/rcscripts/addons/udev-stop.sh:

try tar --one-file-system --numeric-owner -jcpf "${device_tarball}" -T "${devices_totar}"
try mv -f "${device_tarball}" /lib/udev-state/devices.tar.bz2

Removing the "try" word from the start of the lines, removes the error message. So I suppose "try" mustn't be being sourced from /sbin/rc.

My installed versions are:

baselayout-1.12.1
bash-3.1_p16
udev-090

emerge --info below:

Portage 2.1 (default-linux/x86/2005.1, gcc-3.4.5, glibc-2.3.5-r3, 2.6.16.20 i686)
=================================================================
System uname: 2.6.16.20 i686 AMD Athlon(tm) XP 2800+
Gentoo Base System version 1.12.1
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow X aac acpi alsa apache2 atm avi bash-completion berkdb bitmap-fonts browserplugin bzip2 cdr cli crypt dbus dga dri dvd emboss encode fam firefox foomaticdb fortran gdbm geoip gif glitz gnome gnomecanvas gnutls gpm gstreamer gtk gtk2 gtkhtml imlib isdnlog jpeg jpeg2k libg++ libwww mad mikmod mmx mozilla mp3 mpeg ncurses nls nptl nptlonly nsplugin nvidia offensive ogg oggvorbis openal opengl pam pcre pdflib perl png postgres pppd python quicktime readline reflection sdl session sid sndfile spl sse ssl startup-notification svg sysfs tcpd tiff timidity truetype truetype-fonts type1-fonts udev unicode usb vorbis wifi win32codecs wmf xine xml2 xmms xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux linguas_en userland_GNU video_cards_nvidia video_cards_nv"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 SpanKY gentoo-dev 2006-06-11 07:09:27 UTC
this is because of the LC_ALL change where halt.sh is exec-ed instead of source-ed
Comment 4 Roy Marples (RETIRED) gentoo-dev 2006-06-11 08:00:56 UTC
The try function looks like it's purely for startup and not shutdown, so I think the correct fix would be as the reporter stated - remove try from those lines.
Comment 5 SpanKY gentoo-dev 2006-06-11 08:45:53 UTC
fair enough ... that change is fine by me
Comment 6 Paul Bredbury 2006-06-11 08:58:53 UTC
Apologies, it seems fine now during startup (coulda sworn I've seen "try" error messages fly up the screen at startup previously, but oh well). It's only during *shutdown*, with the 2 lines in udev-stop.sh, where the "try" command is unknown.
Comment 7 Roy Marples (RETIRED) gentoo-dev 2006-06-19 05:44:15 UTC
I've fixed this as Greg is busy.
Comment 8 Roy Marples (RETIRED) gentoo-dev 2006-06-19 10:08:08 UTC
*** Bug 137267 has been marked as a duplicate of this bug. ***