diff options
author | Jeremy Katz <katzj@redhat.com> | 2004-11-07 18:39:47 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2004-11-07 18:39:47 +0000 |
commit | 56d64386f065a68782af2a060379c67b2d7bee66 (patch) | |
tree | 5943f3caf8c2790b64c5c6629fd0acd32aaa69b8 /scripts/scrubtree | |
parent | fe5969599d313e1fee48c66fcbd21ca1f6355eae (diff) | |
download | anaconda-56d64386f065a68782af2a060379c67b2d7bee66.tar.gz anaconda-56d64386f065a68782af2a060379c67b2d7bee66.tar.xz anaconda-56d64386f065a68782af2a060379c67b2d7bee66.zip |
2004-11-07 Jeremy Katz <katzj@redhat.com>
* scripts/scrubtree: Clean up handling of binaries that we
want busybox to override. Inspired by #137948.
Diffstat (limited to 'scripts/scrubtree')
-rwxr-xr-x | scripts/scrubtree | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/scripts/scrubtree b/scripts/scrubtree index 4b87c0d60..16fcd1603 100755 --- a/scripts/scrubtree +++ b/scripts/scrubtree @@ -49,14 +49,19 @@ rm $p/etc/ld.so.conf mv $p/usr/sbin/busybox.anaconda $p/usr/bin/busybox (cd $p/usr/bin; set $(./busybox 2>&1| awk '/^\t([[:alnum:]_\[]+,)+/' | sed 's/,//g' | sed 's/ +//'); +dontclobber=(sh busybox reboot shutdown poweroff) while [ -n "$1" ]; do - if [ $1 != "busybox" -a $1 != "sh" -a $1 != "shutdown" -a $1 != "poweroff" -a $1 != "reboot" ]; then - # if file doesnt already exist, link to busybox - if [ ! -f "$1" ]; then - ln -sf ./busybox $1 - else - [ -n "$DEBUG" ] && echo "Overriding busybox version of $1" + save= + for n in ${dontclobber[@]} ; do + if [ "$1" == "$n" ]; then + save=$n fi + done + # if it's not in our list and it doesn't exist, link to busybox + if [ -z "$save" -a ! -f "$1" ]; then + ln -sf ./busybox $1 + else + [ -n "$DEBUG" ] && echo "Overriding busybox version of $1" fi shift done |