Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 62606
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Linux bug wranglers <bug-wranglers@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Elan Ruusamäe <glen@delfi.ee>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 62606 depends on: Show dependency tree
Bug 62606 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-09-02 04:50 0000
i run /etc/init.d/autofs reload, and it outputs:


# /etc/init.d/autofs reload
Reloading automounter: checking for changes ...
tail: cannot open `+2' for reading: No such file or directory
Stopping automounter: ==> /var/run/autofs.net.pid <==
6053
/net ?
  D      0:00 /usr/sbin/automount --timeout 1800 /net program /etc/autofs/net.sh
 * WARNING:  "autofs" has already been started.


the problematic line seems to be:
 command=`tail +2 $i`

the same code using 'set -x' in bash:

# /etc/init.d/autofs reload
Reloading automounter: checking for changes ...
++ head -n 1 /var/run/autofs.net.pid

  B pid=6053
+ '[' 6053 = '' ']'
++ tail +2 /var/run/autofs.net.pid

  tail: cannot open `+2' for reading: No such file or directory
+ command===> /var/run%2Fautofs.net.pid <==
6053
/net ?        D      0:00 /usr/sbin/automount --timeout 1800 %
  2Fnet program /etc/autofs/net.sh
+ grep -q '^==> /var/run/autofs.net.pid <==
6053
/net ?        D      0:00 /usr/sbin/automount --timeout
  1800 /net program /etc/autofs/net.sh' /var/run/autofs.tmp
+ echo 'Stopping automounter:
  ==> /var/run/autofs.net.pid <==
6053
/net ?        D      0:00 /usr/sbin/au
  tomount --timeout 1800 /net program /etc/autofs/net.sh'
Stopping automounter: ==> /var/run/autofs.net.pid <==
6053
/net ?        D      0:00 /usr/sbin/automount --timeout 18
  00 /net program /etc/autofs/net.sh^M
+ kill -USR2 6053
+ rm -f /var/run/autofs.tmp
%
  2B svc_start
+ local retval=0
+ local startfail=no
+ local x=
+ local y=
%
  0D
and the tail command itself:
# tail +2 /var/run/autofs.net.pid
tail:
   cannot open `+2' for reading: No such file or directory
==> /var/run/autofs.net.pid <%3
  D=^M
6053^M
/net ?        D      0:00 /usr/sbin/automount --timeout 1800 /net program /etc/autofs/net.sh


using -n switch:
# tail -n +2 /var/run/autofs.net.pid
/n
  et ?        D      0:00 /usr/sbin/automount --timeout 1800 /net program /etc/autofs/net.sh
%
  0D
and program versions:
# epm -q coreutils autofs
coreutils-5.2
autofs-3.1.7-r5


PS: i'm sorry, the text above is not like the original one used to be, but i posted the original bug, and mozilla responded me that i forgot to choose component, and when i hit back in browser, all the forms were blank. so the text above is extracted with ngrep(1) and perl patterns to decode back from urlencooded data :/

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

------- Comment #1 From Sven Wegener 2004-09-02 10:57:26 0000 -------
I changed the tail +2 to tail -n +2 to be comptatible with latest coreutils.
Fixed in CVS. Thanks for reporting.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug