To ensure that toybox can be installed alongside busybox without
authorPaul Barker <paul@paulbarker.me.uk>
Sat, 4 Apr 2015 16:58:06 +0000 (11:58 -0500)
committerPaul Barker <paul@paulbarker.me.uk>
Sat, 4 Apr 2015 16:58:06 +0000 (11:58 -0500)
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.

25 files changed:
toys/lsb/mount.c
toys/lsb/pidof.c
toys/other/chvt.c
toys/other/ifconfig.c
toys/other/insmod.c
toys/other/lsmod.c
toys/other/netcat.c
toys/other/pivot_root.c
toys/other/readlink.c
toys/other/reboot.c
toys/other/rfkill.c
toys/other/rmmod.c
toys/other/swapoff.c
toys/other/swapon.c
toys/other/sysctl.c
toys/posix/cut.c
toys/posix/df.c
toys/posix/head.c
toys/posix/id.c
toys/posix/mkfifo.c
toys/posix/renice.c
toys/posix/tail.c
toys/posix/tee.c
toys/posix/uniq.c
toys/posix/who.c

index 4d6679d..ce1f87b 100644 (file)
@@ -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
index 51b742f..a8fc8ef 100644 (file)
@@ -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"
index 6544265..a93327f 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2008 David Anders <danders@amltd.com>
 
-USE_CHVT(NEWTOY(chvt, "<1", TOYFLAG_USR|TOYFLAG_SBIN))
+USE_CHVT(NEWTOY(chvt, "<1", TOYFLAG_USR|TOYFLAG_BIN))
 
 config CHVT
   bool "chvt"
index 31fc1d3..6ee01c4 100644 (file)
@@ -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"
index 81721a3..cb222a5 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com>
 
-USE_INSMOD(NEWTOY(insmod, "<1", TOYFLAG_BIN|TOYFLAG_NEEDROOT))
+USE_INSMOD(NEWTOY(insmod, "<1", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
 
 config INSMOD
   bool "insmod"
index b8f5d82..4d16048 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com>
 
-USE_LSMOD(NEWTOY(lsmod, NULL, TOYFLAG_BIN))
+USE_LSMOD(NEWTOY(lsmod, NULL, TOYFLAG_SBIN))
 
 config LSMOD
   bool "lsmod"
index 453a7ca..9d0c3cf 100644 (file)
@@ -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
index 9a1f56c..7748032 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright 2012 Rob Landley <rob@landley.net>
 
-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"
index 1c33362..fecd1ef 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright 2007 Rob Landley <rob@landley.net>
 
-USE_READLINK(NEWTOY(readlink, "<1>1fenq[-fe]", TOYFLAG_BIN))
+USE_READLINK(NEWTOY(readlink, "<1>1fenq[-fe]", TOYFLAG_USR|TOYFLAG_BIN))
 
 config READLINK
   bool "readlink"
index 8baa4d8..a135888 100644 (file)
@@ -2,9 +2,9 @@
  *
  * Copyright 2013 Elie De Brauwer <eliedebrauwer@gmail.com>
 
-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"
index 3ba346b..36fe320 100644 (file)
@@ -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"
index b789acc..10c134c 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com>
 
-USE_RMMOD(NEWTOY(rmmod, "<1wf", TOYFLAG_BIN|TOYFLAG_NEEDROOT))
+USE_RMMOD(NEWTOY(rmmod, "<1wf", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
 
 config RMMOD
   bool "rmmod"
index b89e915..fb17130 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com>
 
-USE_SWAPOFF(NEWTOY(swapoff, "<1>1", TOYFLAG_BIN|TOYFLAG_NEEDROOT))
+USE_SWAPOFF(NEWTOY(swapoff, "<1>1", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
 
 config SWAPOFF
   bool "swapoff"
index 49f1249..838d382 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com>
 
-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"
index d3c4d81..d4ed1b0 100644 (file)
@@ -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"
index 25f25a8..ca014ae 100644 (file)
@@ -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"
index dfc0f25..0bec17f 100644 (file)
@@ -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"
index 9312528..5867dfb 100644 (file)
@@ -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"
index 353aa04..7ab489e 100644 (file)
@@ -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"
index 15fab70..4e0fca3 100644 (file)
@@ -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"
index 8c20644..489eb13 100644 (file)
@@ -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"
index 41d4633..80556e2 100644 (file)
@@ -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"
index 909ea58..d5591b6 100644 (file)
@@ -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"
index 3cfdb94..c127cfe 100644 (file)
@@ -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"
index 876a562..414cdfc 100644 (file)
@@ -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"