Results 1 to 15 of 29

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2007
    Location
    Sweden
    Posts
    33

    Nope tried didn't work to do ln

    Hi Sollie, tried ln -s /opt/bin/busybox head /opt/bin/head but got file exist, even after rm /opt/bin/head

    Editing the the file /opt/bin/update-alternatives with qualified path to head was the thing that helped.

    After editing I did the /opt/lib/ipkg/info/busybox-links.postinst, checked everything and did a ipkg upgrade and all linked well and works again.

    Rejan.

  2. #2
    Hi Sollie, tried ln -s /opt/bin/busybox head /opt/bin/head but got file exist, even after rm /opt/bin/head
    Thats what it says all the time, but its making the file.

    Sollie.

  3. #3
    Join Date
    Jun 2007
    Location
    Sweden
    Posts
    33

    anyhow - linking doesnt work with ln for me

    Hi Sollie, even though the file is made, the postinst-file didn't work until I did a fully qualified path in update_alternatives.

    The link still defaults to the old busybox, easy way to test is to write the command: head-? and check versioninfo on Busybox. That was how I found out that it defaulted wrong version of Busybox.

  4. #4
    K, thanks.

    Sollie.

  5. #5
    Ok, I've tried everything time to ask.

    I have the same problem, syntax error in update-alternatives.
    I tried everything on this post, and still nothing.

    Right now, if I type 'head -?' I get the 'error while loading shared libraries'
    if I type '/opt/bin/head -?' I get 'Busybox v1.7.2 blah,blah,blah' so I guess that's ok.

    I changed the /opt/bin/update-alternatives line from:
    local olink=`head -n 1 $ad/$name`
    to:
    local olink=`/opt/bin/busybox head -n 1 $ad/$name` and
    local olink=`/opt/bin/head -n 1 $ad/$name`

    and neither worked. Help please?

    BTW, 'ln -s /opt/bin/busybox head /opt/bin/head' gave me an error message, 'ln -s /opt/bin/busybox /opt/bin/head' worked ok.

  6. #6
    Join Date
    Jun 2007
    Location
    Sweden
    Posts
    33

    Perhaps this will help?

    Did you use full path as I described it:
    local olink=`$IPKG_OFFLINE_ROOT/opt/bin/busybox head -n 1 $ad/$name`

    Also

    'ln -s /opt/bin/busybox head /opt/bin/head' gave me an error message, 'ln -s /opt/bin/busybox /opt/bin/head' worked ok.
    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.

  7. #7
    Just to confirm,

    The problem is "Syntax error" comes up when installing / running some busybox commands particularly at configuration of ipkg installs correct?

    when you complete the tasks as defined by Sollie and Rejan is the expected output as per below?
    update-alternatives: Linking //opt/sbin/losetup to /opt/bin/busybox
    update-alternatives: Linking //opt/sbin/lsmod to /opt/bin/busybox
    update-alternatives: Linking //opt/sbin/mkswap to /opt/bin/busybox
    update-alternatives: Linking //opt/sbin/modprobe to /opt/bin/busybox
    update-alternatives: Linking //opt/sbin/pivot_root to /opt/bin/busybox
    update-alternatives: Linking //opt/sbin/rdate to /opt/bin/busybox
    update-alternatives: Linking //opt/sbin/rmmod to /opt/bin/busybox
    update-alternatives: Linking //opt/sbin/route to /opt/bin/busybox
    update-alternatives: Linking //opt/sbin/start-stop-daemon to /opt/bin/busybox
    update-alternatives: Linking //opt/sbin/swapoff to /opt/bin/busybox
    update-alternatives: Linking //opt/sbin/swapon to /opt/bin/busybox
    update-alternatives: Linking //opt/sbin/sysctl to /opt/bin/busybox
    One suggestion for those of you struggling to get this going is to do an install of uclibc-opt first, then reinstall busybox and then do the edits per sollie's info
    Last edited by Gizmo1007; 08-11-2007 at 19:28.

  8. #8
    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] ...

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
  •