Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29

Thread: Fix for the /opt/bin/update-alternatives problem!!!

  1. #16
    Join Date
    Jun 2007
    Location
    Sweden
    Posts
    33

    Correct and not :-) for me that is

    Hi Gizmo1007!

    The error is the way you stated 'Syntax error' also the expected result after change.

    The problem was that: install of uclibc-opt first, then reinstall busybox and then do the edits per sollie's info did not work for me. Struggled for hours with it different solutions and that didn't work got the error everytime. Tried to downgrade to 1.5.1-1 didn't work either. The qualified path to the right busybox command 'head' in the 'update-alternatives' did it for me. The default 'head' command came from the wrong busybox (probably the one ASUS shipped it with)

    Rejan.

  2. #17
    Finally! Thanks everyone for the help.

    Quote Originally Posted by Rejan View Post
    The last one I think links busybox to the command /opt/bin/head instead of command '/opt/bin/busybox head' to '/opt/bin/head' which seems like a bad idea. So the linkname for you will be wrong according to syntax, or?

    Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY

    Rejan.
    I tested it and it works: ln -s /opt/bin/busybox /opt/bin/head
    It seems busybox checks the arg[0] (program name, in this case head) to see the command. If I create that link I get the correct help:

    Busybox 1.7.2 ....
    Usage head [OPTION] ...

  3. #18
    On a slightly different tangent,

    Does anyone have a problem when running ps command with busybox 1.7.2
    I can only run ps -w
    nothing else will work.
    Is there another way to check what process are being executed currently.
    I know it's supposed to be ps -x but busybox won't allow me to run that option, only gives -w as available
    any other commands that do the similar?

  4. #19
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    if you install procps ipkg you will get fully functional ps

  5. #20
    thanks for last pointer it worked out,

    One final problem which I have noticed since installing busybox ver 1.7 is that when I power down the unit and repower again windows cannot see the WL700 as a share drive.
    You can see ushare as a media server but cannot see WL700.
    When I reset the unit it comes up fine.
    Question is there any way in rc.local to correct this?

  6. #21
    sorry... now it works
    Last edited by gratitude182; 18-12-2007 at 14:08.

  7. #22
    Join Date
    Jan 2007
    Location
    The Netherlands
    Posts
    244

    Aha, get rid of syntax error from ipkg... that's it

    Maybe superfluous, but the original title Sollie gave: Fix for the /opt/bin/update-alternatives problem!!!, did not tell me very much, when I first saw it. I really never had heard of update-alternatives. Hence, also not of any problem arising from it...

    But, after installing a new package with ipkg these days, which I had not done for months, gave me all sorts of syntax errors and post-errors, as with so many people here.
    But NOW I understand that's because the newer ipkg scripts in /opt/bin/update-alternatives use /bin/sh in stead of /opt/bin/bash. AHA.

    I changed step 2 and 3 from Sollie in:
    2: ln -s /opt/bin/busybox /opt/bin/sort
    3: ln -s /opt/bin/busybox /opt/bin/dirname
    and added:
    3b: ln -s /opt/bin/busybox /opt/bin/head

    Now ipkg does its job fine.
    So I guess this is the final recipe (partly), let alone that if you run K.C.Furge's latest 1.0.7.8 firmware with KCSHELL set, this should not be needed anymore.

    Marc

  8. Hi there,


    a good advice for anyone who has kfurge custom firmware and has ever encountered this problem, above steps will not work, if your environment variables PATH and LD_LIBRARY_PATH are not set properly before!

    You must apply:

    export PATH=/opt/bin:${PATH}
    export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}

  9. #24
    guess i'm stuck and considering to do a complete reinstall after failed upgrade.
    changes made, still get the following errors, symlinks do not work... maybe someone found a fix here?

    ipkg upgrade

    Configuring bzip2
    update-alternatives: Error: cannot register alternative bzip2 to /opt/bin/bzip2 since it is already registered to
    postinst script returned status 1
    ERROR: bzip2.postinst returned 1
    Configuring e2fsprogs
    update-alternatives: Error: cannot register alternative chattr to /opt/bin/chattr since it is already registered to
    update-alternatives: Error: cannot register alternative lsattr to /opt/bin/lsattr since it is already registered to
    update-alternatives: Error: cannot register alternative fsck to /opt/sbin/fsck since it is already registered to
    postinst script returned status 1
    ERROR: e2fsprogs.postinst returned 1
    Configuring findutils
    update-alternatives: Error: cannot register alternative find to /opt/bin/find since it is already registered to
    update-alternatives: Error: cannot register alternative xargs to /opt/bin/xargs since it is already registered to
    postinst script returned status 1
    ERROR: findutils.postinst returned 1
    Configuring ncurses
    update-alternatives: Error: not linking //opt/bin/clear to /opt/bin/ncurses-clear since //opt/bin/clear exists and is not a link
    postinst script returned status 1
    ERROR: ncurses.postinst returned 1
    Nothing to be done

    /opt/lib/ipkg/info/busybox-links.postinst

    update-alternatives: Error: cannot register alternative bzip2 to /opt/bin/bzip2 since it is already registered to
    update-alternatives: Error: cannot register alternative chattr to /opt/bin/chattr since it is already registered to
    update-alternatives: Error: cannot register alternative bzip2 to /opt/bin/bzip2 since it is already registered to
    update-alternatives: Error: not linking //opt/bin/clear to /opt/bin/ncurses-clear since //opt/bin/clear exists and is not a link
    update-alternatives: Error: cannot register alternative find to /opt/bin/find since it is already registered to
    update-alternatives: Error: cannot register alternative lsattr to /opt/bin/lsattr since it is already registered to
    update-alternatives: Error: cannot register alternative lsattr to /opt/bin/lsattr since it is already registered to
    update-alternatives: Error: cannot register alternative xargs to /opt/bin/xargs since it is already registered to
    update-alternatives: Error: cannot register alternative fsck to /opt/sbin/fsck since it is already registered to
    uclibc-opt installed,as well as busybox force-reinstalled, and changes made in
    /opt/bin/update-alternatives
    #!/opt/bin/
    local olink=`$IPKG_OFFLINE_ROOT/opt/bin/busybox head -n 1 $ad/$name`

  10. #25
    set
    PATH='/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
    ipkg status | grep Conflicts
    Conflicts: busybox-links
    Conflicts: vorbis-tools
    Conflicts: thttpd
    Conflicts: wget-ssl

  11. #26
    Join Date
    Jan 2007
    Location
    The Netherlands
    Posts
    244
    Quote Originally Posted by pitsch View Post
    set


    ipkg status | grep Conflicts


    Maybe there is nothing wrong. I had installed wget, that conflicts with wget-ssl. Now I removed wget, and installed wget-ssl. That conflicts with wget, but that is just informative, because wget is not there anymore. So have a look in the list that ipkg status produces to spot the places with Conflicts.
    For instance:
    Code:
    Package: wget-ssl
    Version: 1.11.1-1
    Depends: openss
    Conflicts: wget
    Status: install user installed
    Architecture: mipsel
    Installed-Time: 1207514113
    and

    Code:
    Package: ivorbis-tools
    Version: 1.0-6
    Depends: libvorbis, libogg, libao, libcurl, libvorbisidec
    Conflicts: vorbis-tools
    Status: install user installed
    Architecture: mipsel
    Regards
    Marc
    Last edited by mumsoft; 06-04-2008 at 21:53.

  12. #27

    Ok...managed to completed screw up my postini script...

    Can someone post their full, working copy?

    Thanks!

    Actually it's the update-alternatives config file I need.
    Last edited by Maccro; 26-04-2008 at 15:29. Reason: I'm an idiot

  13. #28
    Join Date
    Jan 2007
    Location
    The Netherlands
    Posts
    244

    Thumbs up

    Quote Originally Posted by Maccro View Post
    Can someone post their full, working copy?

    Thanks!

    Actually it's the update-alternatives config file I need.
    Here is mine (rename it without extension .txt)

    regards,
    Marc
    Attached Files Attached Files

  14. #29

    Thank you!

    Quote Originally Posted by mumsoft View Post
    Here is mine (rename it without extension .txt)

    regards,
    Marc
    That did the trick...thanks!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Problem with OpenWrt FW (Kami 7.07/9)
    By bado in forum WL-700g Firmware Discussion
    Replies: 5
    Last Post: 22-10-2007, 20:43
  2. WL-500gP and Asus support experience
    By Blezi in forum WL-500gP Q&A
    Replies: 6
    Last Post: 03-12-2006, 12:59
  3. complete changelog up to 1.8.2.1
    By Antiloop in forum WL-500g Firmware Releases
    Replies: 0
    Last Post: 27-10-2004, 09:27
  4. Problem with dieing AIR-connection
    By BòóN in forum WL-500g Q&A
    Replies: 7
    Last Post: 26-10-2004, 12:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •