Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/applets


Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
Location:
branches/3.2/mindi-busybox/applets
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/applets/.gitignore

    r2725 r3232  
    11/applet_tables
    22/usage
     3/usage_pod
  • branches/3.2/mindi-busybox/applets/Kbuild.src

    r2725 r3232  
    4343include/applet_tables.h: applets/applet_tables
    4444    $(call cmd,gen_applet_tables)
     45
     46include/NUM_APPLETS.h: applets/applet_tables
     47    $(call cmd,gen_applet_tables)
  • branches/3.2/mindi-busybox/applets/applet_tables.c

    r2725 r3232  
    88 * Licensed under GPLv2, see file LICENSE in this source tree.
    99 */
    10 
     10#include <sys/types.h>
     11#include <sys/stat.h>
     12#include <fcntl.h>
    1113#include <stdlib.h>
    1214#include <string.h>
    1315#include <stdio.h>
     16#include <unistd.h>
     17
     18#undef ARRAY_SIZE
     19#define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0])))
    1420
    1521#include "../include/autoconf.h"
    16 #include "../include/busybox.h"
     22#include "../include/applet_metadata.h"
    1723
    1824struct bb_applet {
     
    7682    if (NUM_APPLETS == 1) {
    7783        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);
    7985    }
    8086    printf("\n");
  • branches/3.2/mindi-busybox/applets/busybox.mkll

    r1765 r3232  
    1515$HOSTCC -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H |
    1616  awk '/^[ \t]*LINK/{
    17     dir=substr($2,8)
     17    dir=substr($2,7)
    1818    gsub("_","/",dir)
    1919    if(dir=="/ROOT") dir=""
  • branches/3.2/mindi-busybox/applets/individual.c

    r2725 r3232  
    1515{
    1616    applet_name = argv[0];
    17     return APPLET_main(argc,argv);
     17    return APPLET_main(argc, argv);
    1818}
    1919
  • branches/3.2/mindi-busybox/applets/install.sh

    r2725 r3232  
    44export LC_CTYPE=POSIX
    55
    6 prefix=${1}
     6prefix=$1
    77if [ -z "$prefix" ]; then
    88    echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--scriptwrapper]"
    9     exit 1;
     9    exit 1
    1010fi
     11
    1112h=`sort busybox.links | uniq`
     13
     14linkopts=""
    1215scriptwrapper="n"
    1316cleanup="0"
     
    3437    fi
    3538
    36     mkdir -p $prefix/$libdir || exit 1
     39    mkdir -p "$prefix/$libdir" || exit 1
    3740    for i in $DO_INSTALL_LIBS; do
    38         rm -f $prefix/$libdir/$i || exit 1
    39         if [ -f $i ]; then
    40             cp -pPR $i $prefix/$libdir/ || exit 1
    41             chmod 0644 $prefix/$libdir/$i || exit 1
     41        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
    4245        fi
    4346    done
     
    4750    inode=`ls -i "$prefix/bin/busybox" | awk '{print $1}'`
    4851    sub_shell_it=`
    49     cd "$prefix"
    50     for d in usr/sbin usr/bin sbin bin; do
    51         pd=$PWD
    52         if [ -d "$d" ]; then
    53             cd $d
    54             ls -iL . | grep "^ *$inode" | awk '{print $2}' | env -i xargs rm -f
    55         fi
    56         cd "$pd"
    57     done
    58     `
     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        `
    5962    exit 0
    6063fi
    6164
    62 rm -f $prefix/bin/busybox || exit 1
    63 mkdir -p $prefix/bin || exit 1
    64 install -m 755 busybox $prefix/bin/busybox || exit 1
     65rm -f "$prefix/bin/busybox" || exit 1
     66mkdir -p "$prefix/bin" || exit 1
     67install -m 755 busybox "$prefix/bin/busybox" || exit 1
    6568
    6669for i in $h; do
    67     appdir=`dirname $i`
    68     mkdir -p $prefix/$appdir || exit 1
     70    appdir=`dirname "$i"`
     71    mkdir -p "$prefix/$appdir" || exit 1
    6972    if [ "$scriptwrapper" = "y" ]; then
    7073        if [ "$swrapall" != "y" ] && [ "$i" = "/bin/sh" ]; then
    71             ln $linkopts busybox $prefix$i || exit 1
     74            ln $linkopts busybox "$prefix/$i" || exit 1
    7275        else
    73             rm -f $prefix$i
    74             echo "#!/bin/busybox" > $prefix$i
    75             chmod +x $prefix/$i
     76            rm -f "$prefix/$i"
     77            echo "#!/bin/busybox" >"$prefix/$i"
     78            chmod +x "$prefix/$i"
    7679        fi
    77         echo "  $prefix$i"
     80        echo "  $prefix/$i"
    7881    else
    7982        if [ "$2" = "--hardlinks" ]; then
     
    9093                bb_path="../bin/busybox"
    9194            ;;
    92             /usr/bin|/usr/sbin)
     95            /usr/bin | /usr/sbin)
    9396                bb_path="../../bin/busybox"
    9497            ;;
    9598            *)
    96             echo "Unknown installation directory: $appdir"
    97             exit 1
     99                echo "Unknown installation directory: $appdir"
     100                exit 1
    98101            ;;
    99102            esac
    100103        fi
    101         if [ "$noclobber" = "0" ] || [ ! -e "$prefix$i" ]; then
    102             echo "  $prefix$i -> $bb_path"
    103             ln $linkopts $bb_path $prefix$i || exit 1
     104        if [ "$noclobber" = "0" ] || [ ! -e "$prefix/$i" ]; then
     105            echo "  $prefix/$i -> $bb_path"
     106            ln $linkopts "$bb_path" "$prefix/$i" || exit 1
    104107        else
    105             echo "  $prefix$i already exists"
     108            echo "  $prefix/$i already exists"
    106109        fi
    107110    fi
  • branches/3.2/mindi-busybox/applets/usage_pod.c

    r2725 r3232  
    3232#define MAKE_USAGE(aname, usage) { aname, usage },
    3333static struct usage_data {
    34         const char *aname;
    35         const char *usage;
     34    const char *aname;
     35    const char *usage;
    3636} usage_array[] = {
    3737#include "applets.h"
Note: See TracChangeset for help on using the changeset viewer.