Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#14010 closed defect (wontfix)

boot script depends on readlink

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

/etc/rc.common line 97

[ -n "$USE_PROCD" ] && {
        . $IPKG_INSTROOT/lib/functions/procd.sh
        basescript=$(readlink "$initscript")
        rc_procd() {
                procd_open_service "$(basename ${basescript:-$initscript})" "$initscript"
                "$@"
                procd_close_service
        }

        start() {
                rc_procd start_service "$@"
        }

        stop() {
                procd_kill "$(basename ${basescript:-$initscript})" "$1"
        }

        reload() {
                start
        }
}

Attachments (0)

Change History (13)

comment:1 Changed 4 years ago by nbd

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

And ....? Is there a point to the story or did you just want to play 'Captain Obvious'? ;)

comment:2 Changed 4 years ago by Andre Maree <andrem@…>

  • Resolution not_a_bug deleted
  • Status changed from closed to reopened

I am having the same error message and I am not aware of any configuration changes my side other than having upgraded from 37116 to r37693

The following error occur 5 times in my specific config:
Fri Aug 9 08:51:22 2013 daemon.info sysinit: /etc/rc.common: line 207: readlink: not found
Fri Aug 9 08:51:22 2013 daemon.info sysinit: /etc/rc.common: line 207: readlink: not found
Fri Aug 9 08:51:22 2013 daemon.info sysinit: /etc/rc.common: line 207: readlink: not found

rc.common does not have a line 207 so it has something to do with the action being executed in line 116. Can we have some pointer on where to start looking for the cause?

Running on a Buffalo wzr-hp-g300nh. Any specific files I can attach to help find the cause?

comment:3 Changed 4 years ago by nbd

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

Your build tree apparently does not include the updated defaults. Run

./scripts/diffconfig.sh > .config.new

then edit .config.new.
Throw out all lines that aren't intentional changes made by you.
Afterwards, replace your .config with the new file and run make defconfig.

comment:4 Changed 4 years ago by Andre Maree <andrem@…>

Thanks a lot, will do and revert..

comment:5 Changed 4 years ago by risa2000

  • Resolution not_a_bug deleted
  • Status changed from closed to reopened

I have just got bitten by this (ar71xx TL-WR1043ND r38093). Normally what I do before rebuilding new revision is this:

svn up
scripts/feeds update
make oldconfig

This apparently does not set READLINK in my .config.

Now what is worrying that even if I do what is suggested above I get this in my .config.new again

# CONFIG_BUSYBOX_CONFIG_READLINK is not set

and I have no way of knowing that I should change it to yes.
And I have no way of knowing that I need to do the whole procedure before the build in the first place.

For me this is a breaking change for anyone who is building image from the trunk and I do not agree with being it silently pushed onto the users. There should be a different way how to pass this type of information.

comment:6 Changed 4 years ago by jow

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

The correct approach is to keep only the output of "./scripts/diffconfig.sh", then after a source upgrade prime a fresh .config with it and run "make defconfig" to populate the defaults.

There are a lot of implicit dependencies on busybox applets and we're not going to add a special case for "readlink" otherwise we would need to start adding dependencies on "rm", "mv", "mkdir", "cp", "sh" etc.

comment:7 Changed 4 years ago by risa2000

  • Resolution not_a_bug deleted
  • Status changed from closed to reopened

I understand what is the correct approach. But unfortunately I did not do it 4 years or such ago when I built it first. Even if I do diffconfig now, I would end up with READLINK not set. I have not touched busybox config for several years, so I could assume it is just there for as long, or it may have changed along, but I have no warning that boot suddenly depends on it. There is no indication.

You knew why you did add readlink and you should know, what would happen if someone has opted it off, either because it has not been needed until now, or he just have not clue (as I did).

So I am asking, if you change the config in a way that the boot depends on it, make it obvious. If you definitely need to break it, break the build, not the boot.

'readlink' is in no way analogy to 'rm', 'mv', 'mkdir' as you have not added them just now (while everything was working without them before), I hope you see the difference.

comment:8 Changed 4 years ago by jow

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

There is no way to do that easily and no plans to invest further work into this non-issue.
If you update from a 4 year old tree you should not keep your .config anyway but redo it from scratch.

comment:9 Changed 4 years ago by nbd

There is an easy way to repair your 4 year old config. Run ./scripts/diffconfig.sh to a new file in your current tree. Then, delete all lines that do not contain *intentional* changes made by you. Afterwards, copy the new config to .config and run make defconfig.

comment:10 Changed 4 years ago by risa2000

For jow and nbd - I have been updating my build relatively regularly, I mean the tree. But for the config I only made "make oldconfig" to merge new options.

Over the years and because I am building ImageBuilder, my config accumulated many "intentional" changes where I just disabled some module or feature because they did not build at the time and I really did not need them (as ImageBuilder builds basically everything).

So even if it sounds quite easy to solve to you, it might not be that easy in some different situation. My point was that anything which breaks potentially the boot of the system (or makes it inaccessible) should be handled with more care than just "take it and figure out yourself that we broke it".

comment:11 Changed 4 years ago by linuxliste@…

I got same problem and i find a way;

make menuconfig

Base system -->> Busy box -->> Core Utils -->> readlink (*)

You can try this.

comment:12 Changed 4 years ago by rnemec

Hmm, really great. :-( This cost me several hours when I tried to determine, why updating from 37777 to 38943 makes my Asus WL500GP V2 non-functional. After checking readlink (suggested by linuxliste above) in menuconfig and recompiling, everything went fine....

comment:13 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.