maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N800 (https://talk.maemo.org/forumdisplay.php?f=25)
-   -   /etc/rc2.d/ renaming? (https://talk.maemo.org/showthread.php?t=35859)

Jaygo333 2009-12-04 04:47

/etc/rc2.d/ renaming?
 
I was having trouble updating the headphone app and openntpd and it was really bugging me. Reading through the errors it was giving me, I saw it was freezing on symbolic linking and exiting
Code:

invoke-rc.d: not a symlink: "/etc/rc2.d/S20openntpd"
invoke-rc.d: dangling symlink: "/etc/rc2.d/S20openntpd"
invoke-rc.d: not a symlink: "/etc/rc2.d/S99zheadphoned"
invoke-rc.d: dangling symlink: "/etc/rc2.d/S99zheadphoned"

So I went to /etc/rc2.d/ and renamed said files.
Before
S20openntpd
S99zheadphoned
After
S20openntpd.BAK
S99zheadphoned.BAK

And after running update again, it worked.
My question is, what did i just do?
And after the updates, I see no openntpd or headphoned files in /rc2.d/ only the BAK that I made. Shouldn't there be new ones created? Just thinking aloud.

On a side note, everytime I run apt-get "anything" this line always shows up
Code:

/usr/sbin/invoke-rc.d: line 1: a#!/bin/sh: not found
I thought sh was BusyBox, so how is it not found?

R-R 2009-12-04 05:24

Re: /etc/rc2.d/ renaming?
 
you seemed to have moved symlinks pointing to nowhere that were for some reasons in the way.

Jaygo333 2009-12-04 05:56

Re: /etc/rc2.d/ renaming?
 
So I broke said symlinks?

Because I just did the same to hildon-desktop as it was giving me a problem during update and the first thing it did when I tried to update after renaming it is start the hildon desktop.

(if you can read that)

Jaygo333 2009-12-04 06:16

Re: /etc/rc2.d/ renaming?
 
I have about 40 files in said directory.

Following your post, are you saying all of them are symlinks pointing nowhere?

codeMonkey 2009-12-04 07:41

Re: /etc/rc2.d/ renaming?
 
No - you're goiing to need those symlinks.
Possibly including the ones you've removed

They are there to set up any system services and things that happen during change of run-levels.

Here's a related link to something qwerty12 wrote whilst solving this.

As for your invoke-rc.d script: it shouldn't have the "a" before the # on the first line.

speculatrix 2009-12-07 23:48

Re: /etc/rc2.d/ renaming?
 
Quote:

Originally Posted by Jaygo333 (Post 409089)
I have about 40 files in said directory.

Following your post, are you saying all of them are symlinks pointing nowhere?

if you "cd /etc/rc2.d" and do "wc -l *" you will quickly see which symlink points to a valid file and which not when you get an error reported

delete the broken symlinks and replace them by looking in /etc/init.d and making a new symlink. e.g. if you have "S20foobar" and it is dangling, "rm S20foobar" then "ln -s /etc/init.d/foobar S20foobar" - IF there's an appopriate package.

in theory provided you have been using the package manager to add and remove things you should never get any broken startup scripts.


All times are GMT. The time now is 07:21.

vBulletin® Version 3.8.8