Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/applets
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- Location:
- branches/3.2/mindi-busybox/applets
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/applets/.gitignore
r2725 r3232 1 1 /applet_tables 2 2 /usage 3 /usage_pod -
branches/3.2/mindi-busybox/applets/Kbuild.src
r2725 r3232 43 43 include/applet_tables.h: applets/applet_tables 44 44 $(call cmd,gen_applet_tables) 45 46 include/NUM_APPLETS.h: applets/applet_tables 47 $(call cmd,gen_applet_tables) -
branches/3.2/mindi-busybox/applets/applet_tables.c
r2725 r3232 8 8 * Licensed under GPLv2, see file LICENSE in this source tree. 9 9 */ 10 10 #include <sys/types.h> 11 #include <sys/stat.h> 12 #include <fcntl.h> 11 13 #include <stdlib.h> 12 14 #include <string.h> 13 15 #include <stdio.h> 16 #include <unistd.h> 17 18 #undef ARRAY_SIZE 19 #define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0]))) 14 20 15 21 #include "../include/autoconf.h" 16 #include "../include/ busybox.h"22 #include "../include/applet_metadata.h" 17 23 18 24 struct bb_applet { … … 76 82 if (NUM_APPLETS == 1) { 77 83 printf("#define SINGLE_APPLET_STR \"%s\"\n", applets[0].name); 78 printf("#define SINGLE_APPLET_MAIN %s_main\n", applets[0]. name);84 printf("#define SINGLE_APPLET_MAIN %s_main\n", applets[0].main); 79 85 } 80 86 printf("\n"); -
branches/3.2/mindi-busybox/applets/busybox.mkll
r1765 r3232 15 15 $HOSTCC -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H | 16 16 awk '/^[ \t]*LINK/{ 17 dir=substr($2, 8)17 dir=substr($2,7) 18 18 gsub("_","/",dir) 19 19 if(dir=="/ROOT") dir="" -
branches/3.2/mindi-busybox/applets/individual.c
r2725 r3232 15 15 { 16 16 applet_name = argv[0]; 17 return APPLET_main(argc, argv);17 return APPLET_main(argc, argv); 18 18 } 19 19 -
branches/3.2/mindi-busybox/applets/install.sh
r2725 r3232 4 4 export LC_CTYPE=POSIX 5 5 6 prefix=$ {1}6 prefix=$1 7 7 if [ -z "$prefix" ]; then 8 8 echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--scriptwrapper]" 9 exit 1 ;9 exit 1 10 10 fi 11 11 12 h=`sort busybox.links | uniq` 13 14 linkopts="" 12 15 scriptwrapper="n" 13 16 cleanup="0" … … 34 37 fi 35 38 36 mkdir -p $prefix/$libdir|| exit 139 mkdir -p "$prefix/$libdir" || exit 1 37 40 for i in $DO_INSTALL_LIBS; do 38 rm -f $prefix/$libdir/$i|| exit 139 if [ -f $i]; then40 cp -pPR $i $prefix/$libdir/|| exit 141 chmod 0644 $prefix/$libdir/$i|| exit 141 rm -f "$prefix/$libdir/$i" || exit 1 42 if [ -f "$i" ]; then 43 cp -pPR "$i" "$prefix/$libdir/" || exit 1 44 chmod 0644 "$prefix/$libdir/$i" || exit 1 42 45 fi 43 46 done … … 47 50 inode=`ls -i "$prefix/bin/busybox" | awk '{print $1}'` 48 51 sub_shell_it=` 49 cd "$prefix"50 for d in usr/sbin usr/bin sbin bin; do51 pd=$PWD52 if [ -d "$d" ]; then53 cd $d54 ls -iL . | grep "^ *$inode" | awk '{print $2}' | env -i xargs rm -f55 fi56 cd "$pd"57 done58 `52 cd "$prefix" 53 for d in usr/sbin usr/bin sbin bin; do 54 pd=$PWD 55 if [ -d "$d" ]; then 56 cd "$d" 57 ls -iL . | grep "^ *$inode" | awk '{print $2}' | env -i xargs rm -f 58 fi 59 cd "$pd" 60 done 61 ` 59 62 exit 0 60 63 fi 61 64 62 rm -f $prefix/bin/busybox|| exit 163 mkdir -p $prefix/bin|| exit 164 install -m 755 busybox $prefix/bin/busybox|| exit 165 rm -f "$prefix/bin/busybox" || exit 1 66 mkdir -p "$prefix/bin" || exit 1 67 install -m 755 busybox "$prefix/bin/busybox" || exit 1 65 68 66 69 for i in $h; do 67 appdir=`dirname $i`68 mkdir -p $prefix/$appdir|| exit 170 appdir=`dirname "$i"` 71 mkdir -p "$prefix/$appdir" || exit 1 69 72 if [ "$scriptwrapper" = "y" ]; then 70 73 if [ "$swrapall" != "y" ] && [ "$i" = "/bin/sh" ]; then 71 ln $linkopts busybox $prefix$i|| exit 174 ln $linkopts busybox "$prefix/$i" || exit 1 72 75 else 73 rm -f $prefix$i74 echo "#!/bin/busybox" > $prefix$i75 chmod +x $prefix/$i76 rm -f "$prefix/$i" 77 echo "#!/bin/busybox" >"$prefix/$i" 78 chmod +x "$prefix/$i" 76 79 fi 77 echo " $prefix $i"80 echo " $prefix/$i" 78 81 else 79 82 if [ "$2" = "--hardlinks" ]; then … … 90 93 bb_path="../bin/busybox" 91 94 ;; 92 /usr/bin |/usr/sbin)95 /usr/bin | /usr/sbin) 93 96 bb_path="../../bin/busybox" 94 97 ;; 95 98 *) 96 echo "Unknown installation directory: $appdir"97 exit 199 echo "Unknown installation directory: $appdir" 100 exit 1 98 101 ;; 99 102 esac 100 103 fi 101 if [ "$noclobber" = "0" ] || [ ! -e "$prefix $i" ]; then102 echo " $prefix $i -> $bb_path"103 ln $linkopts $bb_path $prefix$i|| exit 1104 if [ "$noclobber" = "0" ] || [ ! -e "$prefix/$i" ]; then 105 echo " $prefix/$i -> $bb_path" 106 ln $linkopts "$bb_path" "$prefix/$i" || exit 1 104 107 else 105 echo " $prefix $i already exists"108 echo " $prefix/$i already exists" 106 109 fi 107 110 fi -
branches/3.2/mindi-busybox/applets/usage_pod.c
r2725 r3232 32 32 #define MAKE_USAGE(aname, usage) { aname, usage }, 33 33 static struct usage_data { 34 35 34 const char *aname; 35 const char *usage; 36 36 } usage_array[] = { 37 37 #include "applets.h"
Note:
See TracChangeset
for help on using the changeset viewer.