update-alternatives question
Joel Newkirk
freerunner at newkirk.us
Sun Sep 14 03:59:21 CEST 2008
Quick question, hopefully someone can instantly see my error:
I've built the full iproute2 toolset, and am working on an ipk/opk for ip
and tc.
The default om2008 at least, has /bin/ip linked to /bin/busybox. So that
should be changed. For inspiration, I looked at the postinst script for
grep, since it must perform the same changes. (point at full bin instead
of busybox in postinst, restore in prerm) So I took the
update-alternatives line from grep's postinst and simply replaced 'grep'
with 'ip' everywhere.
root at iota:~# update-alternatives --install /usr/bin/ip ip ip.ip 100
update-alternatives: Error: cannot register alternative ip to /usr/bin/ip
since it is already registered to /bin/ip
Isn't this the point of update-alternatives - to allow multiple possible
binaries, and 'register' the one with highest priority? What have I done
wrong? And why is the <path> component grep.grep (or in my case ip.ip)??
I checked and /usr/lib/opkg/alternatives/ip and
/usr/lib/opkg/alternatives/grep are the same - busybox 50.
j
More information about the community
mailing list