# HG changeset patch # User Paul Barker # Date 1428166686 18000 # Node ID 57f2a26fa92c40c47cd17efa22a85ce52c9fb6c4 # Parent 014a5e821603a904a3e17e96e024d1d64d32aa35 To ensure that toybox can be installed alongside busybox without confusing update-alternatives, the paths of the links installed by toybox should match those installed by busybox. This is accomplished by changing the flags of a few tools within toybox. diff -r 014a5e821603 -r 57f2a26fa92c toys/lsb/mount.c --- a/toys/lsb/mount.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/lsb/mount.c Sat Apr 04 11:58:06 2015 -0500 @@ -6,7 +6,7 @@ * Note: -hV is bad spec, haven't implemented -FsLU yet * no mtab (/proc/mounts does it) so -n is NOP. -USE_MOUNT(NEWTOY(mount, "?O:afnrvwt:o*[-rw]", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_STAYROOT)) +USE_MOUNT(NEWTOY(mount, "?O:afnrvwt:o*[-rw]", TOYFLAG_BIN|TOYFLAG_STAYROOT)) //USE_NFSMOUNT(NEWTOY(nfsmount, "?<2>2", TOYFLAG_USR|TOYFLAG_BIN|TOYFLAG_STAYROOT)) config MOUNT diff -r 014a5e821603 -r 57f2a26fa92c toys/lsb/pidof.c --- a/toys/lsb/pidof.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/lsb/pidof.c Sat Apr 04 11:58:06 2015 -0500 @@ -5,7 +5,7 @@ * * http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/pidof.html -USE_PIDOF(NEWTOY(pidof, "<1so:", TOYFLAG_USR|TOYFLAG_BIN)) +USE_PIDOF(NEWTOY(pidof, "<1so:", TOYFLAG_BIN)) config PIDOF bool "pidof" diff -r 014a5e821603 -r 57f2a26fa92c toys/other/chvt.c --- a/toys/other/chvt.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/other/chvt.c Sat Apr 04 11:58:06 2015 -0500 @@ -2,7 +2,7 @@ * * Copyright (C) 2008 David Anders -USE_CHVT(NEWTOY(chvt, "<1", TOYFLAG_USR|TOYFLAG_SBIN)) +USE_CHVT(NEWTOY(chvt, "<1", TOYFLAG_USR|TOYFLAG_BIN)) config CHVT bool "chvt" diff -r 014a5e821603 -r 57f2a26fa92c toys/other/ifconfig.c --- a/toys/other/ifconfig.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/other/ifconfig.c Sat Apr 04 11:58:06 2015 -0500 @@ -6,7 +6,7 @@ * * Not in SUSv4. -USE_IFCONFIG(NEWTOY(ifconfig, "^?a", TOYFLAG_BIN)) +USE_IFCONFIG(NEWTOY(ifconfig, "^?a", TOYFLAG_SBIN)) config IFCONFIG bool "ifconfig" diff -r 014a5e821603 -r 57f2a26fa92c toys/other/insmod.c --- a/toys/other/insmod.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/other/insmod.c Sat Apr 04 11:58:06 2015 -0500 @@ -2,7 +2,7 @@ * * Copyright 2012 Elie De Brauwer -USE_INSMOD(NEWTOY(insmod, "<1", TOYFLAG_BIN|TOYFLAG_NEEDROOT)) +USE_INSMOD(NEWTOY(insmod, "<1", TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) config INSMOD bool "insmod" diff -r 014a5e821603 -r 57f2a26fa92c toys/other/lsmod.c --- a/toys/other/lsmod.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/other/lsmod.c Sat Apr 04 11:58:06 2015 -0500 @@ -2,7 +2,7 @@ * * Copyright 2012 Elie De Brauwer -USE_LSMOD(NEWTOY(lsmod, NULL, TOYFLAG_BIN)) +USE_LSMOD(NEWTOY(lsmod, NULL, TOYFLAG_SBIN)) config LSMOD bool "lsmod" diff -r 014a5e821603 -r 57f2a26fa92c toys/other/netcat.c --- a/toys/other/netcat.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/other/netcat.c Sat Apr 04 11:58:06 2015 -0500 @@ -4,7 +4,7 @@ * * TODO: udp, ipv6, genericize for telnet/microcom/tail-f -USE_NETCAT(OLDTOY(nc, netcat, TOYFLAG_BIN)) +USE_NETCAT(OLDTOY(nc, netcat, TOYFLAG_USR|TOYFLAG_BIN)) USE_NETCAT(NEWTOY(netcat, USE_NETCAT_LISTEN("^tlL")"w#p#s:q#f:", TOYFLAG_BIN)) config NETCAT diff -r 014a5e821603 -r 57f2a26fa92c toys/other/pivot_root.c --- a/toys/other/pivot_root.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/other/pivot_root.c Sat Apr 04 11:58:06 2015 -0500 @@ -2,7 +2,7 @@ * * Copyright 2012 Rob Landley -USE_PIVOT_ROOT(NEWTOY(pivot_root, "<2>2", TOYFLAG_USR|TOYFLAG_BIN)) +USE_PIVOT_ROOT(NEWTOY(pivot_root, "<2>2", TOYFLAG_SBIN)) config PIVOT_ROOT bool "pivot_root" diff -r 014a5e821603 -r 57f2a26fa92c toys/other/readlink.c --- a/toys/other/readlink.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/other/readlink.c Sat Apr 04 11:58:06 2015 -0500 @@ -2,7 +2,7 @@ * * Copyright 2007 Rob Landley -USE_READLINK(NEWTOY(readlink, "<1>1fenq[-fe]", TOYFLAG_BIN)) +USE_READLINK(NEWTOY(readlink, "<1>1fenq[-fe]", TOYFLAG_USR|TOYFLAG_BIN)) config READLINK bool "readlink" diff -r 014a5e821603 -r 57f2a26fa92c toys/other/reboot.c --- a/toys/other/reboot.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/other/reboot.c Sat Apr 04 11:58:06 2015 -0500 @@ -2,9 +2,9 @@ * * Copyright 2013 Elie De Brauwer -USE_REBOOT(NEWTOY(reboot, "n", TOYFLAG_BIN|TOYFLAG_NEEDROOT)) -USE_REBOOT(OLDTOY(halt, reboot, TOYFLAG_BIN|TOYFLAG_NEEDROOT)) -USE_REBOOT(OLDTOY(poweroff, reboot, TOYFLAG_BIN|TOYFLAG_NEEDROOT)) +USE_REBOOT(NEWTOY(reboot, "n", TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) +USE_REBOOT(OLDTOY(halt, reboot, TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) +USE_REBOOT(OLDTOY(poweroff, reboot, TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) config REBOOT bool "reboot" diff -r 014a5e821603 -r 57f2a26fa92c toys/other/rfkill.c --- a/toys/other/rfkill.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/other/rfkill.c Sat Apr 04 11:58:06 2015 -0500 @@ -5,7 +5,7 @@ * * No Standard -USE_RFKILL(NEWTOY(rfkill, "<1>2", TOYFLAG_SBIN)) +USE_RFKILL(NEWTOY(rfkill, "<1>2", TOYFLAG_USR|TOYFLAG_SBIN)) config RFKILL bool "rfkill" diff -r 014a5e821603 -r 57f2a26fa92c toys/other/rmmod.c --- a/toys/other/rmmod.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/other/rmmod.c Sat Apr 04 11:58:06 2015 -0500 @@ -2,7 +2,7 @@ * * Copyright 2012 Elie De Brauwer -USE_RMMOD(NEWTOY(rmmod, "<1wf", TOYFLAG_BIN|TOYFLAG_NEEDROOT)) +USE_RMMOD(NEWTOY(rmmod, "<1wf", TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) config RMMOD bool "rmmod" diff -r 014a5e821603 -r 57f2a26fa92c toys/other/swapoff.c --- a/toys/other/swapoff.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/other/swapoff.c Sat Apr 04 11:58:06 2015 -0500 @@ -2,7 +2,7 @@ * * Copyright 2012 Elie De Brauwer -USE_SWAPOFF(NEWTOY(swapoff, "<1>1", TOYFLAG_BIN|TOYFLAG_NEEDROOT)) +USE_SWAPOFF(NEWTOY(swapoff, "<1>1", TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) config SWAPOFF bool "swapoff" diff -r 014a5e821603 -r 57f2a26fa92c toys/other/swapon.c --- a/toys/other/swapon.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/other/swapon.c Sat Apr 04 11:58:06 2015 -0500 @@ -2,7 +2,7 @@ * * Copyright 2012 Elie De Brauwer -USE_SWAPON(NEWTOY(swapon, "<1>1p#<0>32767", TOYFLAG_BIN|TOYFLAG_NEEDROOT)) +USE_SWAPON(NEWTOY(swapon, "<1>1p#<0>32767", TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) config SWAPON bool "swapon" diff -r 014a5e821603 -r 57f2a26fa92c toys/other/sysctl.c --- a/toys/other/sysctl.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/other/sysctl.c Sat Apr 04 11:58:06 2015 -0500 @@ -5,7 +5,7 @@ * * No Standard -USE_SYSCTL(NEWTOY(sysctl, "^neNqwpaA[!ap][!aq][!aw][+aA]", TOYFLAG_USR|TOYFLAG_BIN)) +USE_SYSCTL(NEWTOY(sysctl, "^neNqwpaA[!ap][!aq][!aw][+aA]", TOYFLAG_SBIN)) config SYSCTL bool "sysctl" diff -r 014a5e821603 -r 57f2a26fa92c toys/posix/cut.c --- a/toys/posix/cut.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/posix/cut.c Sat Apr 04 11:58:06 2015 -0500 @@ -5,7 +5,7 @@ * * http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cut.html -USE_CUT(NEWTOY(cut, "b:|c:|f:|d:sn[!cbf]", TOYFLAG_BIN)) +USE_CUT(NEWTOY(cut, "b:|c:|f:|d:sn[!cbf]", TOYFLAG_USR|TOYFLAG_BIN)) config CUT bool "cut" diff -r 014a5e821603 -r 57f2a26fa92c toys/posix/df.c --- a/toys/posix/df.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/posix/df.c Sat Apr 04 11:58:06 2015 -0500 @@ -4,7 +4,7 @@ * * See http://opengroup.org/onlinepubs/9699919799/utilities/df.html -USE_DF(NEWTOY(df, "Pkt*a[-Pk]", TOYFLAG_USR|TOYFLAG_SBIN)) +USE_DF(NEWTOY(df, "Pkt*a[-Pk]", TOYFLAG_SBIN)) config DF bool "df" diff -r 014a5e821603 -r 57f2a26fa92c toys/posix/head.c --- a/toys/posix/head.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/posix/head.c Sat Apr 04 11:58:06 2015 -0500 @@ -4,7 +4,7 @@ * * See http://opengroup.org/onlinepubs/9699919799/utilities/head.html -USE_HEAD(NEWTOY(head, "?n#<0=10", TOYFLAG_BIN)) +USE_HEAD(NEWTOY(head, "?n#<0=10", TOYFLAG_USR|TOYFLAG_BIN)) config HEAD bool "head" diff -r 014a5e821603 -r 57f2a26fa92c toys/posix/id.c --- a/toys/posix/id.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/posix/id.c Sat Apr 04 11:58:06 2015 -0500 @@ -6,10 +6,10 @@ * * See http://opengroup.org/onlinepubs/9699919799/utilities/id.html -USE_ID(NEWTOY(id, ">1"USE_ID_SELINUX("Z")"nGgru[!"USE_ID_SELINUX("Z")"Ggu]", TOYFLAG_BIN)) +USE_ID(NEWTOY(id, ">1"USE_ID_SELINUX("Z")"nGgru[!"USE_ID_SELINUX("Z")"Ggu]", TOYFLAG_USR|TOYFLAG_BIN)) USE_GROUPS(NEWTOY(groups, NULL, TOYFLAG_USR|TOYFLAG_BIN)) -USE_LOGNAME(NEWTOY(logname, ">0", TOYFLAG_BIN)) -USE_WHOAMI(OLDTOY(whoami, logname, TOYFLAG_BIN)) +USE_LOGNAME(NEWTOY(logname, ">0", TOYFLAG_USR|TOYFLAG_BIN)) +USE_WHOAMI(OLDTOY(whoami, logname, TOYFLAG_USR|TOYFLAG_BIN)) config ID bool "id" diff -r 014a5e821603 -r 57f2a26fa92c toys/posix/mkfifo.c --- a/toys/posix/mkfifo.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/posix/mkfifo.c Sat Apr 04 11:58:06 2015 -0500 @@ -4,7 +4,7 @@ * * See http://opengroup.org/onlinepubs/9699919799/utilities/mkfifo.html -USE_MKFIFO(NEWTOY(mkfifo, "<1m:", TOYFLAG_BIN)) +USE_MKFIFO(NEWTOY(mkfifo, "<1m:", TOYFLAG_USR|TOYFLAG_BIN)) config MKFIFO bool "mkfifo" diff -r 014a5e821603 -r 57f2a26fa92c toys/posix/renice.c --- a/toys/posix/renice.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/posix/renice.c Sat Apr 04 11:58:06 2015 -0500 @@ -4,7 +4,7 @@ * * See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/renice.html -USE_RENICE(NEWTOY(renice, "<1gpun#|", TOYFLAG_BIN)) +USE_RENICE(NEWTOY(renice, "<1gpun#|", TOYFLAG_USR|TOYFLAG_BIN)) config RENICE bool "renice" diff -r 014a5e821603 -r 57f2a26fa92c toys/posix/tail.c --- a/toys/posix/tail.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/posix/tail.c Sat Apr 04 11:58:06 2015 -0500 @@ -4,7 +4,7 @@ * * See http://opengroup.org/onlinepubs/9699919799/utilities/tail.html -USE_TAIL(NEWTOY(tail, "?fc-n-[-cn]", TOYFLAG_BIN)) +USE_TAIL(NEWTOY(tail, "?fc-n-[-cn]", TOYFLAG_USR|TOYFLAG_BIN)) config TAIL bool "tail" diff -r 014a5e821603 -r 57f2a26fa92c toys/posix/tee.c --- a/toys/posix/tee.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/posix/tee.c Sat Apr 04 11:58:06 2015 -0500 @@ -4,7 +4,7 @@ * * See http://opengroup.org/onlinepubs/9699919799/utilities/tee.html -USE_TEE(NEWTOY(tee, "ia", TOYFLAG_BIN)) +USE_TEE(NEWTOY(tee, "ia", TOYFLAG_USR|TOYFLAG_BIN)) config TEE bool "tee" diff -r 014a5e821603 -r 57f2a26fa92c toys/posix/uniq.c --- a/toys/posix/uniq.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/posix/uniq.c Sat Apr 04 11:58:06 2015 -0500 @@ -4,7 +4,7 @@ * * See http://opengroup.org/onlinepubs/9699919799/utilities/uniq.html -USE_UNIQ(NEWTOY(uniq, "f#s#w#zicdu", TOYFLAG_BIN)) +USE_UNIQ(NEWTOY(uniq, "f#s#w#zicdu", TOYFLAG_USR|TOYFLAG_BIN)) config UNIQ bool "uniq" diff -r 014a5e821603 -r 57f2a26fa92c toys/posix/who.c --- a/toys/posix/who.c Sat Apr 04 01:26:58 2015 -0500 +++ b/toys/posix/who.c Sat Apr 04 11:58:06 2015 -0500 @@ -9,7 +9,7 @@ * Posix says to support many options (-abdHlmpqrstTu) but this * isn't aimed at minicomputers with modem pools. -USE_WHO(NEWTOY(who, "a", TOYFLAG_BIN)) +USE_WHO(NEWTOY(who, "a", TOYFLAG_USR|TOYFLAG_BIN)) config WHO bool "who"