Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#728 closed defect (invalid)

/usr/sbin/update-rc.d: line 173: runlevel: not found

Reported by: kavol Owned by: ainulindale
Priority: major Milestone:
Component: SHR Image Version: SHR-unstable
Keywords: Cc:

Description

After running "opkg upgrade", many post-install scripts failed with the message:

/usr/sbin/update-rc.d: line 173: runlevel: not found

It seems that the recent sysvinit is missing this command:

root@om-gta02:~# opkg files sysvinit
Package sysvinit (2.86-r57.4) is installed on root and has the following files:
/sbin/halt.sysvinit
/etc/default/rcS
/sbin/poweroff.sysvinit
/etc/init.d/rc
/bin/mountpoint
/etc/init.d/rcS
/sbin/reboot.sysvinit
/sbin/telinit
/sbin/init.sysvinit
/sbin/killall5

(Or at least I believe runlevel should be part of sysvinit?)

Change History (8)

comment:1 Changed 8 years ago by Heinervdm

  • Resolution set to invalid
  • Status changed from new to closed

As we said in the release notes opkg upgrade won't work. And you are now seeing why ;)

This specific problem can be solved by reinstalling sysvinit.

But nobody knows if there aren't other packages that have to be reinstalled...

comment:2 Changed 8 years ago by kavol

  • Resolution invalid deleted
  • Status changed from closed to reopened

ahem, could you please link which document do you call "Release notes"? - searching the trac, I've found just http://trac.shr-project.org/trac/wiki/Draft:MS1-relnotes which does not mention anything about opkg (oh, and it is draft)

no, reinstalling sysvinit does NOT resolve the issue (well, that was the first that I've tried before opening the ticket), thus reopening:

root@om-gta02:~# opkg -force-depends remove sysvinit 
Removing package sysvinit from root...               
update-alternatives: Removing //sbin/halt            
update-alternatives: Linking //sbin/halt to ../bin/busybox
update-alternatives: Removing //sbin/reboot               
update-alternatives: Linking //sbin/reboot to ../bin/busybox
update-alternatives: Removing //sbin/init                   
update-alternatives: Linking //sbin/init to ../bin/busybox  
root@om-gta02:~# opkg install sysvinit              
Installing sysvinit (2.86-r57.4) to root...         
Downloading http://build.shr-project.org/shr-unstable/ipk//armv4t/sysvinit_2.86-r57.4_armv4t.ipk
Configuring fso-gpsd                                                                            
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring connman                                                                             
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring portmap                                                                             
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring netbase                                                                             
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring frameworkd                                                                          
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring atd-over-fso                                                                        
Reloading system message bus config: done.                                                      
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring phonefsod                                                                           
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring apmd                                                                                
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring busybox-syslog                                                                      
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring sysvinit                                                                            
update-alternatives: Removing //sbin/halt                                                       
update-alternatives: Linking //sbin/halt to halt.sysvinit                                       
update-alternatives: Removing //sbin/reboot                                                     
update-alternatives: Linking //sbin/reboot to reboot.sysvinit                                   
update-alternatives: Removing //sbin/poweroff                                                   
update-alternatives: Linking //sbin/poweroff to poweroff.sysvinit                               
update-alternatives: Removing //sbin/init                                                       
update-alternatives: Linking //sbin/init to /sbin/init.sysvinit                                 
Collected errors:                                                                               
 * ERROR: fso-gpsd.postinst returned 1                                                          
 * ERROR: connman.postinst returned 1                                                           
 * ERROR: portmap.postinst returned 1                                                           
 * ERROR: netbase.postinst returned 1                                                           
 * ERROR: frameworkd.postinst returned 1                                                        
 * ERROR: atd-over-fso.postinst returned 1                                                      
 * ERROR: phonefsod.postinst returned 1                                                         
 * ERROR: apmd.postinst returned 1                                                              
 * ERROR: busybox-syslog.postinst returned 1                                                    
root@om-gta02:~# runlevel                                                                       
-sh: runlevel: not found

or, the other way, which seems to be preferred on OpenMoko wiki (http://wiki.openmoko.org/wiki/SHR_User_Manual):

root@om-gta02:~# opkg -force-reinstall install sysvinit
Reinstalling sysvinit (2.86-r57.4) on root...          
Downloading http://build.shr-project.org/shr-unstable/ipk//armv4t/sysvinit_2.86-r57.4_armv4t.ipk
Configuring fso-gpsd                                                                            
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring connman                                                                             
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring portmap                                                                             
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring netbase                                                                             
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring frameworkd                                                                          
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring atd-over-fso                                                                        
Reloading system message bus config: done.                                                      
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring phonefsod                                                                           
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1                                                               
Configuring apmd                                                                                
/usr/sbin/update-rc.d: line 173: runlevel: not found                                            
Unable to determine current runlevel                                                            
postinst script returned status 1
Configuring busybox-syslog
/usr/sbin/update-rc.d: line 173: runlevel: not found
Unable to determine current runlevel
postinst script returned status 1
Configuring sysvinit
update-alternatives: Removing //sbin/halt
update-alternatives: Linking //sbin/halt to halt.sysvinit
update-alternatives: Removing //sbin/reboot
update-alternatives: Linking //sbin/reboot to reboot.sysvinit
update-alternatives: Removing //sbin/poweroff
update-alternatives: Linking //sbin/poweroff to poweroff.sysvinit
update-alternatives: Removing //sbin/init
update-alternatives: Linking //sbin/init to /sbin/init.sysvinit
Collected errors:
 * ERROR: fso-gpsd.postinst returned 1
 * ERROR: connman.postinst returned 1
 * ERROR: portmap.postinst returned 1
 * ERROR: netbase.postinst returned 1
 * ERROR: frameworkd.postinst returned 1
 * ERROR: atd-over-fso.postinst returned 1
 * ERROR: phonefsod.postinst returned 1
 * ERROR: apmd.postinst returned 1
 * ERROR: busybox-syslog.postinst returned 1
root@om-gta02:~# runlevel
-sh: runlevel: not found
root@om-gta02:~# opkg files sysvinit
Package sysvinit (2.86-r57.4) is installed on root and has the following files:
/sbin/halt.sysvinit
/etc/default/rcS
/sbin/poweroff.sysvinit
/etc/init.d/rc
/bin/mountpoint
/etc/init.d/rcS
/sbin/reboot.sysvinit
/sbin/telinit
/sbin/init.sysvinit
/sbin/killall5

(not to mention that running the script from the abovementioned page that should fix the upgrade issues haven't worked either ... has anyone ever tried really running that?)

comment:3 follow-up: Changed 8 years ago by Heinervdm

This is meant by Release Notes: http://blog.shr-project.org/2009/11/new-shr-image-finally-out.html
It was also posted on all mailinglists.

comment:4 in reply to: ↑ 3 Changed 8 years ago by kavol

Replying to Heinervdm:

This is meant by Release Notes: http://blog.shr-project.org/2009/11/new-shr-image-finally-out.html
It was also posted on all mailinglists.

thanks

but is that really important? - I mean, does the image contain the "runlevel" command without it belonging to any package? ... then it is still a bug, there should be no programs laying around unmanaged by the package system

comment:5 follow-up: Changed 8 years ago by dos

  • Resolution set to invalid
  • Status changed from reopened to closed

a) reflash, it was clearly mentioned that upgrade won't work and we're not supporting it
b) you can also reinstall sysvinit-utils if you're as brave as me :P

comment:6 in reply to: ↑ 5 ; follow-up: Changed 8 years ago by kavol

Replying to dos:

a) reflash, it was clearly mentioned that upgrade won't work and we're not supporting it

um, so, if a package is broken, and simple reinstallation of the affected package should help, but it doesn't, instead of admitting that there is a bug in the package/packaging system, you say that proper way of fixing the problem is reinstall of the whole system, loosing time with backing up and restoring, and doing all the post-install setup and upgrade tasks ...?

ok, I give up, this works too:

root@om-gta02:~# cat /bin/runlevel
#!/bin/sh

echo "N 5"

b) you can also reinstall sysvinit-utils if you're as brave as me :P

this does not help:

root@om-gta02:~# opkg -force-reinstall install sysvinit sysvinit-utils
Reinstalling sysvinit (2.86-r57.4) on root...
Downloading http://build.shr-project.org/shr-unstable/ipk//armv4t/sysvinit_2.86-r57.4_armv4t.ipk
Reinstalling sysvinit-utils (2.86-r57.4) on root...
Downloading http://build.shr-project.org/shr-unstable/ipk//armv4t/sysvinit-utils_2.86-r57.4_armv4t.ipk
Configuring sysvinit-utils
update-alternatives: Linking //usr/bin/last to last.sysvinit
update-alternatives: Linking //usr/bin/mesg to mesg.sysvinit
update-alternatives: Linking //usr/bin/wall to wall.sysvinit
update-alternatives: Linking //sbin/shutdown to shutdown.sysvinit
Configuring sysvinit
update-alternatives: Linking //sbin/halt to halt.sysvinit
update-alternatives: Linking //sbin/reboot to reboot.sysvinit
update-alternatives: Linking //sbin/poweroff to poweroff.sysvinit
update-alternatives: Linking //sbin/init to /sbin/init.sysvinit
root@om-gta02:~# opkg -A search /sbin/runlevel
root@om-gta02:~# opkg files sysvinit
Package sysvinit (2.86-r57.4) is installed on root and has the following files:
/sbin/poweroff.sysvinit
/etc/default/rcS
/sbin/reboot.sysvinit
/etc/init.d/rc
/bin/mountpoint
/sbin/telinit
/sbin/init.sysvinit
/etc/init.d/rcS
/sbin/killall5
/sbin/halt.sysvinit
root@om-gta02:~# opkg files sysvinit-utils
Package sysvinit-utils (2.86-r57.4) is installed on root and has the following files:
root@om-gta02:~#

(oh, sysvinit-utils doesn't have any files? WTF?)

comment:7 in reply to: ↑ 6 Changed 8 years ago by dos

Replying to kavol:

Replying to dos:

a) reflash, it was clearly mentioned that upgrade won't work and we're not supporting it

um, so, if a package is broken, and simple reinstallation of the affected package should help, but it doesn't, instead of admitting that there is a bug in the package/packaging system, you say that proper way of fixing the problem is reinstall of the whole system, loosing time with backing up and restoring, and doing all the post-install setup and upgrade tasks ...?

ok, I give up, this works too:

root@om-gta02:~# cat /bin/runlevel
#!/bin/sh

echo "N 5"

b) you can also reinstall sysvinit-utils if you're as brave as me :P

this does not help:

root@om-gta02:~# opkg -force-reinstall install sysvinit sysvinit-utils
Reinstalling sysvinit (2.86-r57.4) on root...
Downloading http://build.shr-project.org/shr-unstable/ipk//armv4t/sysvinit_2.86-r57.4_armv4t.ipk
Reinstalling sysvinit-utils (2.86-r57.4) on root...
Downloading http://build.shr-project.org/shr-unstable/ipk//armv4t/sysvinit-utils_2.86-r57.4_armv4t.ipk
Configuring sysvinit-utils
update-alternatives: Linking //usr/bin/last to last.sysvinit
update-alternatives: Linking //usr/bin/mesg to mesg.sysvinit
update-alternatives: Linking //usr/bin/wall to wall.sysvinit
update-alternatives: Linking //sbin/shutdown to shutdown.sysvinit
Configuring sysvinit
update-alternatives: Linking //sbin/halt to halt.sysvinit
update-alternatives: Linking //sbin/reboot to reboot.sysvinit
update-alternatives: Linking //sbin/poweroff to poweroff.sysvinit
update-alternatives: Linking //sbin/init to /sbin/init.sysvinit
root@om-gta02:~# opkg -A search /sbin/runlevel
root@om-gta02:~# opkg files sysvinit
Package sysvinit (2.86-r57.4) is installed on root and has the following files:
/sbin/poweroff.sysvinit
/etc/default/rcS
/sbin/reboot.sysvinit
/etc/init.d/rc
/bin/mountpoint
/sbin/telinit
/sbin/init.sysvinit
/etc/init.d/rcS
/sbin/killall5
/sbin/halt.sysvinit
root@om-gta02:~# opkg files sysvinit-utils
Package sysvinit-utils (2.86-r57.4) is installed on root and has the following files:
root@om-gta02:~#

(oh, sysvinit-utils doesn't have any files? WTF?)

Well, this upgrade isn't supposed to be successful mostly due to changes in package dependences and versions, which are not handled correctly by opkg. We won't support upgrade path before fixing basic OE stuff (but now we're very close to have everything sorted out - after that, shr-testing will be released), so that's why it's WONTFIX and it won't change.

comment:8 Changed 8 years ago by kavol

ahem, there is a slight difference between INVALID and WONTFIX ...

and I'm not talking about supporting the unsupported upgrade path, but about a problem with opkg (now when I see that the sysvinit package itself is probably not at fault), and if it is a known problem (from what you say, it must exist also in the opkg distributed as part of the image, so no real difference how I got to this) then just make this a duplicate of the ticket that deals with it

Note: See TracTickets for help on using tickets.