FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 03-31-2011, 08:28 AM
Martin Gracik
 
Default Add busybox to initrd (#500527)

---
scripts/mk-images | 40 ++++++++++++++++++++++------------------
1 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/scripts/mk-images b/scripts/mk-images
index 99d861c..a61b930 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -449,25 +449,7 @@ EOF
cp -f $IMGPATH/usr/sbin/sshd $MBD_DIR/sbin/sshd
cp -f $IMGPATH/usr/sbin/xinetd $MBD_DIR/sbin/xinetd
cp -f $IMGPATH/usr/sbin/in.telnetd $MBD_DIR/sbin/in.telnetd
- cp -f $IMGPATH/usr/bin/bash $MBD_DIR/sbin/bash
cp -f $IMGPATH/usr/bin/ipcalc $MBD_DIR/sbin/ipcalc
- cp -f $IMGPATH/usr/bin/busybox $MBD_DIR/sbin/busybox
-
- # make some symlinks
- ln -sf bash $MBD_DIR/sbin/sh
- (cd $MBD_DIR/sbin;
- set $(./busybox 2>&1| awk '/^ ([[:alnum:]_.[]+,)+/' | sed 's/,//g' | sed 's/ +//');
- while [ -n "$1" ]; do
- if [ $1 != "busybox" -a $1 != "sh" ]; 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"
- fi
- fi
- shift
- done )

# and copy libraries too
mkdir -p $MBD_DIR/$LIBDIR $MBD_DIR/lib
@@ -533,6 +515,26 @@ EOF
done
}

+addBusyBox() {
+ cp -f $IMGPATH/usr/bin/bash $MBD_DIR/sbin/bash
+ cp -f $IMGPATH/usr/bin/busybox $MBD_DIR/sbin/busybox
+
+ # make some symlinks
+ ln -sf bash $MBD_DIR/sbin/sh
+ (cd $MBD_DIR/sbin;
+ set $(./busybox 2>&1 | awk '/^ ([[:alnum:]_.[]+,)+/' | sed 's/,//g' | sed 's/ +//');
+ while [ -n "$1" ]; do
+ if [ $1 != "busybox" -a $1 != "sh" ]; then
+ if [ ! -f "$1" ]; then
+ ln -sf ./busybox $1
+ else
+ [ -n "$DEBUG" ] && echo "Overriding busybox version of $1"
+ fi
+ fi
+ shift
+ done)
+}
+
makeinitrd() {
EXTRAINITRDPATH=""
INITRDSIZE=""
@@ -677,6 +679,8 @@ EOF
setupShellEnvironment
fi

+ addBusyBox
+
cat > $MBD_DIR/.profile <<EOF
PATH=/bin:/usr/bin:/usr/sbin:/mnt/sysimage/sbin:/mnt/sysimage/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin
export PATH
--
1.7.3.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-31-2011, 01:37 PM
Chris Lumens
 
Default Add busybox to initrd (#500527)

> scripts/mk-images | 40 ++++++++++++++++++++++------------------
> 1 files changed, 22 insertions(+), 18 deletions(-)

Looks okay to me.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 06:46 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org