- rewrite run-parts
text data bss dec hex filename 1029 0 0 1029 405 debianutils/run_parts.o-old 478 0 0 478 1de debianutils/run_parts.o-new-bare 600 0 0 600 258 debianutils/run_parts.o-new-full bare, i.e. without long opts and fancy stuff ./scripts/bloat-o-meter bb_old busybox_unstripped function old new delta act - 215 +215 run_parts_main 216 201 -15 valid_name 50 - -50 runparts_long_options 64 - -64 .rodata 124323 124163 -160 run_parts 513 - -513 ------------------------------------------------------------------------------ (add/remove: 1/3 grow/shrink: 0/2 up/down: 215/-802) Total: -587 bytes
This commit is contained in:
@ -2760,13 +2760,28 @@
|
||||
" -l, --range=RNG Levelrange" \
|
||||
|
||||
#define run_parts_trivial_usage \
|
||||
"[-t] [-a ARG] [-u MASK] DIRECTORY"
|
||||
"[-t] "USE_FEATURE_RUN_PARTS_FANCY("[-l] ")"[-a ARG] [-u MASK] DIRECTORY"
|
||||
#define run_parts_full_usage \
|
||||
"Run a bunch of scripts in a directory" \
|
||||
"\n\nOptions:\n" \
|
||||
" -t Prints what would be run, but does not actually run anything\n" \
|
||||
" -a ARG Pass ARG as an argument for every program invoked\n" \
|
||||
" -u MASK Set the umask to MASK before executing every program"
|
||||
" -u MASK Set the umask to MASK before executing every program" \
|
||||
USE_FEATURE_RUN_PARTS_FANCY("\n -l Prints names of all matching files even when they are not executable")
|
||||
|
||||
#define run_parts_example_usage \
|
||||
"$ run-parts -a start /etc/init.d\n" \
|
||||
"$ run-parts -a stop=now /etc/init.d\n\n" \
|
||||
"Let's assume you have a script foo/dosomething:\n" \
|
||||
"#!/bin/sh\n" \
|
||||
"for i in $*; do eval $i; done ; unset i\n" \
|
||||
"case \"$1\" in\n" \
|
||||
"start*) echo starting something ;;\n" \
|
||||
"stop*) set -x ; shutdown -h $stop ;;\n" \
|
||||
"esac\n\n" \
|
||||
"Running this yields:\n" \
|
||||
"$run-parts -a stop=+4m foo/\n" \
|
||||
"+ shutdown -h +4m"
|
||||
|
||||
#define runlevel_trivial_usage \
|
||||
"[utmp]"
|
||||
|
Reference in New Issue
Block a user