[PATCH] nologin: new applet.

Harald Becker ralda at gmx.de
Fri Nov 4 16:09:08 UTC 2011


 Hi!

> And a standalone file takes minimum 4k of disk space

Ok that's a true argument. As an optional applet the real disk space
used may be less with the binary version. Depends on the usage.

As a hint to save disk space for shell scripts (there are so many really
small scripts): Use the same technique to create multi function scripts
as Busybox uses.

Example stub (without error checks):

file my-scripts:

#!/bin/sh
case "$1" in
  nologin) ...;;
  add-shell) ...;;
  remove-shell) ...;;
  *) echo "usage: ...";;
esac

... then create symlinks "nologin", "add-shell", "remove-shell" etc.
pointing to my-scripts.

... this saves a lot of disk space as many small scripts are packed into
a single file (which still is less than 4k or 8k in many cases).

--
Harald



More information about the busybox mailing list