[NBLUG/talk] Re: Init script stoped working in debian.

Steve Johnson gnuguy at gmail.com
Mon Jan 31 14:17:45 PST 2005


srj at smeagol:~$ head =n4 /etc/init.d/sendmail
head: cannot open `=n4' for reading: No such file or directory
==> /etc/init.d/sendmail <==
#!/bin/sh -e
#
# $Sendmail: init.d,v 8.12.11 2004-04-22 15:43:34 cowboy Exp $
#
# Sendmail rc script for Debian (/etc/init.d/sendmail)
#
# Copyright (c) 2001-2003, Richard Nelson <cowboy at debian.org>.
#
# Notes (to all):
#       * *** Do not edit this file *** Instead edit /etc/mail/sendmail.conf


And..

smeagol:~# strace /etc/init.d/sendmail start >strace.out
execve("/etc/init.d/sendmail", ["/etc/init.d/sendmail", "start"], [/*
12 vars */]) = 0
uname({sys="Linux", node="smeagol", ...}) = 0
brk(0)                                  = 0x80e5a94
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40017000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=16860, ...}) = 0
old_mmap(NULL, 16860, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libncurses.so.5", O_RDONLY)  = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\342"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=252592, ...}) = 0
old_mmap(NULL, 257868, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001d000
old_mmap(0x40053000, 36864, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0x35000) = 0x40053000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\34\0\000"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9872, ...}) = 0
old_mmap(NULL, 8632, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4005c000
old_mmap(0x4005e000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x4005e000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200^\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1244016, ...}) = 0
old_mmap(NULL, 1254180, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4005f000
old_mmap(0x40187000, 32768, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 3, 0x127000) = 0x40187000
old_mmap(0x4018f000, 8996, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4018f000
close(3)                                = 0
munmap(0x40018000, 16860)               = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
open("/dev/tty", O_RDWR|O_NONBLOCK|O_LARGEFILE) = 3
close(3)                                = 0
brk(0)                                  = 0x80e5a94
brk(0)                                  = 0x80e5a94
brk(0x80e6000)                          = 0x80e6000
brk(0)                                  = 0x80e6000
brk(0x80e7000)                          = 0x80e7000
getuid32()                              = 0
getgid32()                              = 0
geteuid32()                             = 0
getegid32()                             = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
time(NULL)                              = 1107209396
brk(0)                                  = 0x80e7000
brk(0x80e8000)                          = 0x80e8000
brk(0)                                  = 0x80e8000
brk(0x80e9000)                          = 0x80e9000
open("/etc/mtab", O_RDONLY)             = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=281, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40018000
read(3, "/dev/hda6 / ext3 rw,errors=remou"..., 4096) = 281
close(3)                                = 0
munmap(0x40018000, 4096)                = 0
open("/proc/meminfo", O_RDONLY)         = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x40018000
read(3, "        total:    used:    free:"..., 4096) = 523
close(3)                                = 0
munmap(0x40018000, 4096)                = 0
brk(0)                                  = 0x80e9000
brk(0x80ea000)                          = 0x80ea000
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
uname({sys="Linux", node="smeagol", ...}) = 0
stat64("/root", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getpid()                                = 6736
getppid()                               = 6735
getpgrp()                               = 6735
rt_sigaction(SIGCHLD, {0x8076f50, [], SA_RESTORER, 0x40088678},
{SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
open("/etc/init.d/sendmail", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbffff3ec) = -1 ENOTTY
(Inappropriate ioctl for device)
_llseek(3, 0, [0], SEEK_CUR)            = 0
read(3, "#!/bin/sh -e\n#\n# $Sendmail: init"..., 80) = 80
_llseek(3, 0, [0], SEEK_SET)            = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
dup2(3, 255)                            = 255
close(3)                                = 0
fcntl64(255, F_SETFD, FD_CLOEXEC)       = 0
fcntl64(255, F_GETFL)                   = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fstat64(255, {st_mode=S_IFREG|0755, st_size=807, ...}) = 0
_llseek(255, 0, [0], SEEK_CUR)          = 0
brk(0)                                  = 0x80ea000
brk(0x80eb000)                          = 0x80eb000
brk(0)                                  = 0x80eb000
brk(0x80ec000)                          = 0x80ec000
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
read(255, "#!/bin/sh -e\n#\n# $Sendmail: init"..., 807) = 807
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
stat64("/usr/share/sendmail/sendmail", {st_mode=S_IFREG|0755,
st_size=676131, ...}) = 0
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
stat64("/usr/share/sendmail/sendmail", {st_mode=S_IFREG|0755,
st_size=676131, ...}) = 0
open("/usr/share/sendmail/sendmail", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0755, st_size=676131, ...}) = 0
brk(0)                                  = 0x80ec000
brk(0x81ec000)                          = 0x81ec000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0`\257\4"...,
676131) = 676131
close(3)                                = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
stat64(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/bin/ELF", 0xbfffef90)      = -1 ENOENT (No such file or directory)
stat64("/usr/bin/ELF", 0xbfffef90)  = -1 ENOENT (No such file or directory)
stat64("/sbin/ELF", 0xbfffef90)     = -1 ENOENT (No such file or directory)
stat64("/usr/sbin/ELF", 0xbfffef90) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [RTMIN], 8) = 0
fork()                                  = 6737
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [RTMIN], 8) = 0
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [RTMIN], 8) = 0
rt_sigaction(SIGINT, {0x8075fd0, [], SA_RESTORER, 0x40088678}, {SIG_DFL}, 8) = 0
waitpid(-1, /etc/init.d/sendmail: line 1: ELF: command not found
[{WIFEXITED(s) && WEXITSTATUS(s) == 127}], 0) = 6737
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, 0xbfffedac, WNOHANG)        = -1 ECHILD (No child processes)
sigreturn()                             = ? (mask now [RTMIN])
rt_sigaction(SIGINT, {SIG_DFL}, {0x8075fd0, [], SA_RESTORER, 0x40088678}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
brk(0)                                  = 0x81ec000
brk(0x80ec000)                          = 0x80ec000
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
exit_group(127)

On Mon, 31 Jan 2005 12:32:12 -0800, Steve Johnson <gnuguy at gmail.com> wrote:
> I'm not sure when this happened, but my /etc/init.d/sendmail init
> script stoped working on my debian stable box, after I noticed this, I
> checked on my testing box, and it stopped working too.
> 
> I get this when I run it.
> 
> smeagol:~# /etc/init.d/sendmail stop
> /etc/init.d/sendmail: line 1: ELF: command not found
> 
> This happens on both my testing and stable box, and yes I am logged in
> as root when I run the command =)
> 
> Any ideas?
> 
> -Steve
> 
> 
> --
>       "Knowing others is wisdom, knowing your self is Enlightenment."
>                                                    -- Lao-Tzu
> |C8H10N4O2|
> 


-- 
      "Knowing others is wisdom, knowing your self is Enlightenment."
                                                   -- Lao-Tzu
|C8H10N4O2|




More information about the talk mailing list