Thread: [Runnix-commits] SF.net SVN: runnix:[92] trunk/target/generic/target_skeleton/runnix
Status: Alpha
Brought to you by:
krisk84
From: <ppr...@us...> - 2010-02-01 05:28:48
|
Revision: 92 http://runnix.svn.sourceforge.net/runnix/?rev=92&view=rev Author: pprindeville Date: 2010-02-01 05:28:42 +0000 (Mon, 01 Feb 2010) Log Message: ----------- Script cleanup. Modified Paths: -------------- trunk/target/generic/target_skeleton/runnix Modified: trunk/target/generic/target_skeleton/runnix =================================================================== --- trunk/target/generic/target_skeleton/runnix 2010-01-28 19:09:33 UTC (rev 91) +++ trunk/target/generic/target_skeleton/runnix 2010-02-01 05:28:42 UTC (rev 92) @@ -12,36 +12,35 @@ DRIVES="hda hdb hdc hdd hde hdf hdg hdh sda sdb sdc sdd" do_failure () { -if [ "$SSHPORT" ] -then -mount -t devpts devpts /dev/pts -echo "Generating keys" -/usr/bin/dropbearkey -t rsa -f /tmp/rsa_key -s 1024 -/usr/bin/dropbearkey -t dss -f /tmp/dss_key -s 1024 + if [ -n "$SSHPORT" ]; then + mount -t devpts devpts /dev/pts -if [ "$FAILIP" -a "$FAILNM" -a "$FAILDEV" ] -then -ifconfig $FAILDEV $FAILIP netmask $FAILNM + echo "Generating keys" + dropbearkey -t rsa -f /tmp/rsa_key -s 1024 + dropbearkey -t dss -f /tmp/dss_key -s 1024 -if [ "$FAILGW" ] -then -route del -net default 2> /dev/null -route add -net default gw $FAILGW -fi + if [ -n "$FAILIP" -a -n "$FAILNM" -a -n "$FAILDEV" ]; then + ifconfig $FAILDEV $FAILIP netmask $FAILNM -SSHIP="$FAILIP" -else -SSHIP="$EXTIP" -fi + if [ -n "$FAILGW" ]; then + route del -net default 2> /dev/null + route add -net default gw $FAILGW + fi -touch /var/log/lastlog -touch /var/log/wtmp -echo "Starting dropbear" -/usr/sbin/dropbear -d /tmp/dss_key -r /tmp/rsa_key -E -P /tmp/dropbear.pid -p $SSHPORT -fi + SSHIP="$FAILIP" + else + SSHIP="$EXTIP" + fi -echo "Dropping to shell" -exec /bin/sh + touch /var/log/lastlog + touch /var/log/wtmp + + echo "Starting dropbear" + dropbear -d /tmp/dss_key -r /tmp/rsa_key -E -P /tmp/dropbear.pid -p $SSHPORT + fi + + echo "Dropping to shell" + exec /bin/sh } echo " @@ -54,268 +53,233 @@ CMDLINE=`cat /proc/cmdline` -for x in $DRIVES -do -if `mount -t iso9660 -o ro /dev/${x} $BASE > /dev/null 2>&1` -then -if [ -f $BASE/runnix ] -then -DEVICE=${x} -RODEV=yes -else -umount /dev/${x} -fi -fi +for x in $DRIVES; do + if mount -t iso9660 -o ro /dev/${x} $BASE >/dev/null; then + if [ -f $BASE/runnix ]; then + DEVICE=${x} + RODEV=yes + else + umount /dev/${x} + fi + fi done -for x in $DRIVES -do -if `mount -t vfat /dev/${x}1 $BASE > /dev/null 2>&1` -then -if [ -f $BASE/runnix ] -then -DEVICE=${x} -else -umount /dev/${x}1 -fi -fi +for x in $DRIVES; do + if mount -t vfat /dev/${x}1 $BASE >/dev/null; then + if [ -f $BASE/runnix ]; then + DEVICE=${x} + else + umount /dev/${x}1 + fi + fi done hostname runnix # Loader not found -if [ ! $DEVICE ] -then -echo "Runnix device not found" -exec /bin/sh +if [ -z "$DEVICE" ]; then + echo "Runnix device not found" + exec /bin/sh -i </dev/console fi # get image name -for i in ${CMDLINE} -do -if `echo $i | grep -q "runimg="` -then -RUNIMG=`echo $i | grep "runimg="| sed -e 's/runimg=//'` -fi +for i in $CMDLINE; do + case $i in + runimg=*) + RUNIMG="`echo $i | cut -c8-`" + ;; + esac done -if [ -f $BASE/os/default.conf ] -then -. $BASE/os/default.conf +if [ -f $BASE/os/default.conf ]; then + . $BASE/os/default.conf fi -if `grep -q doshell /proc/cmdline` -then -echo "Dropping to shell" -exec /bin/sh +if grep -q doshell /proc/cmdline; then + echo "Dropping to shell" + exec /bin/sh -i </dev/console fi -if `grep -q dofail /proc/cmdline` -then -do_failure +if grep -q dofail /proc/cmdline; then + do_failure fi -if [ ! "$RUNIMG" ] -then -RUNIMG="auto" +if [ -z "$RUNIMG" ]; then + RUNIMG="auto" fi #Network support - yikes #VLANS -if [ "$VLANS" ] -then -for i in $VLANS -do -IF=`echo $i | cut -d. -f1` -VID=`echo $i | cut -d. -f2` -ifconfig $IF up -vconfig add $IF $VID > /dev/null +for i in $VLANS; do + IF=`echo $i | cut -d. -f1` + VID=`echo $i | cut -d. -f2` + ifconfig $IF up + vconfig add $IF $VID > /dev/null done -fi -if [ "$NDEV" ] -then -ifconfig lo up 127.0.0.1 +if [ -n "$NDEV" ]; then + ifconfig lo up 127.0.0.1 -if [ "$MAC" ] -then -ifconfig "$NDEV" hw ether "$MAC" -fi + if [ -n "$MAC" ]; then + ifconfig "$NDEV" hw ether "$MAC" + fi -if [ "$IP" = "dhcp" ] -then -echo "Configuring $NDEV with DHCP..." -udhcpc -nq -s /etc/udhcpc.script -i "$NDEV" -else -ifconfig "$NDEV" inet "$IP" netmask "$NM" -route add -net default gw "$GW" + if [ "$IP" = "dhcp" ]; then + echo "Configuring $NDEV with DHCP..." + udhcpc -nq -s /etc/udhcpc.script -i "$NDEV" + else + ifconfig "$NDEV" inet "$IP" netmask "$NM" + route add -net default gw "$GW" -for i in $DNS -do -echo "nameserver $i" >> /tmp/etc/resolv.conf -done + for i in $DNS; do + echo "nameserver $i" >> /tmp/etc/resolv.conf + done -fi + fi -if [ "$URL" ] -then -echo "Checking for updates..." + if [ -n "$URL" ]; then + echo "Checking for updates..." -if `wget -q -c -O /tmp/ver $URL/ver` -then -VER=`cat /tmp/ver` + if wget -q -c -O /tmp/ver $URL/ver; then + VER="`cat /tmp/ver`" -if [ -f $BASE/os/ver ] -then -OVER=`cat $BASE/os/ver` -else -OVER="NONE" -fi + if [ -f $BASE/os/ver ]; then + OVER="`cat $BASE/os/ver`" + else + OVER="NONE" + fi -if [ ! "$VER" = "$OVER" ] -then -echo "New version: $VER + if [ "$VER" != "$OVER" ]; then + echo "New version: $VER Old version: $OVER" -wget -c -O /tmp/$VER.tar.gz $URL/$VER.tar.gz -wget -q -c -O /tmp/$VER.tar.gz.sha1 $URL/$VER.tar.gz.sha1 -cd /tmp -echo "Verifying download - please wait" -if `sha1sum -cs $VER.tar.gz.sha1` -then -echo "Extracting image - please wait" -cd $BASE/os -tar -xzf /tmp/$VER.tar.gz -sync -echo "Verifying image - please wait" + wget -c -O /tmp/$VER.tar.gz $URL/$VER.tar.gz + wget -q -c -O /tmp/$VER.tar.gz.sha1 $URL/$VER.tar.gz.sha1 -cd $BASE/os/$VER -if `sha1sum -cs $VER.run.sha1` -then -mv $BASE/os/$VER/* $BASE/os/ && mv /tmp/ver $BASE/os/ver -rmdir $BASE/os/$VER -IMGVER=1 + cd /tmp + echo "Verifying download - please wait" -if [ "$USLEEP" ] -then -echo "Sleeping for "$USLEEP" seconds" -sleep $USLEEP -fi + if sha1sum -cs $VER.tar.gz.sha1; then + echo "Extracting image - please wait" + tar -C $BASE/os -xzf /tmp/$VER.tar.gz + sync + + echo "Verifying image - please wait" + + cd $BASE/os/$VER + if sha1sum -cs $VER.run.sha1; then + mv $BASE/os/$VER/* $BASE/os/ && mv /tmp/ver $BASE/os/ver + cd .. + rmdir $BASE/os/$VER + IMGVER=1 + + if [ -n "$USLEEP" ]; then + echo "Sleeping for "$USLEEP" seconds" + sleep $USLEEP + fi + + fi + fi + fi + fi + fi fi -fi -fi -fi -fi -fi -if [ "$RUNIMG" = "auto" ] -then -# Get the latest good one -cd $BASE/os -RUNIMG=`ls *.run | tail -n1` +if [ "$RUNIMG" = "auto" ]; then + # Get the latest good one + cd $BASE/os + RUNIMG="`ls *.run | tail -n1`" fi #If we have a ver file, override auto/default.conf value -if [ -f $BASE/os/ver ] -then -RUNIMG=`cat $BASE/os/ver`.run +if [ -f $BASE/os/ver ]; then + RUNIMG="`cat $BASE/os/ver`.run" fi -if [ ! "$IMGVER" ] -then -echo "Verifying $RUNIMG..." +if [ -z "$IMGVER" ]; then + echo "Verifying $RUNIMG..." -if `sha1sum -cs $RUNIMG.sha1` -then -echo "$RUNIMG verified" -IMGVER=1 -else -echo "$RUNIMG not verified" -fi + if sha1sum -cs $RUNIMG.sha1; then + echo "$RUNIMG verified" + IMGVER=1 + else + echo "$RUNIMG not verified" + fi fi -if [ -f $BASE/os/$RUNIMG.conf ] -then -. $BASE/os/$RUNIMG.conf +if [ -f $BASE/os/$RUNIMG.conf ]; then + . $BASE/os/$RUNIMG.conf fi -if [ ! "$OFFSET" ] -then -losetup /dev/loop0 $BASE/os/$RUNIMG +if [ -z "$OFFSET" ]; then + losetup /dev/loop0 $BASE/os/$RUNIMG else -losetup -o "$OFFSET" /dev/loop0 $BASE/os/$RUNIMG + losetup -o "$OFFSET" /dev/loop0 $BASE/os/$RUNIMG fi -if [ ! "$FSTYPE" ] -then -FSTYPE=ext2 +if [ -z "$FSTYPE" ]; then + FSTYPE=ext2 fi -if `mount -t $FSTYPE -o ro /dev/loop0 $ROOT` -then -echo "Root mounted" +if mount -t $FSTYPE -o ro /dev/loop0 $ROOT; then + echo "Root mounted" else -echo "Error mounting $RUNIMG root fs" -do_failure + echo "Error mounting $RUNIMG root fs" + do_failure fi -if [ "$INITRD" ] -then +if [ -n "$INITRD" ]; then -if [ -r "$INITRD" ] -then -echo "Custom initrd $INITRD found" -else -INITRD=$BASE/os/initrd.img -echo "Custom initrd not found - using $INITRD" -fi + if [ -r "$INITRD" ]; then + echo "Custom initrd $INITRD found" + else + INITRD=$BASE/os/initrd.img + echo "Custom initrd not found - using $INITRD" + fi else -echo "Using default initrd" -INITRD=$BASE/os/initrd.img + echo "Using default initrd" + INITRD=$BASE/os/initrd.img fi -if [ "$KERN" ] -then +if [ -n "$KERN" ]; then -if [ -r "$KERN" ] -then -echo "Custom kernel $KERN found" -else -KERN=$ROOT/boot/bzImage -echo "Custom kernel not found - using $KERN" -fi + if [ -r "$KERN" ]; then + echo "Custom kernel $KERN found" + else + KERN=$ROOT/boot/bzImage + echo "Custom kernel not found - using $KERN" + fi else -echo "Using default kernel" -KERN=$ROOT/boot/bzImage + echo "Using default kernel" + KERN=$ROOT/boot/bzImage fi -if [ -r "$INITRD" -a -r "$KERN" ] -then -echo "Copying kernel and initrd to ramdisk..." -mount -t tmpfs none /mnt/tmp -cp "$INITRD" /mnt/tmp/initrd.img -cp "$KERN" /mnt/tmp/bzImage -echo "Unmounting image..." -umount $ROOT +if [ -r "$INITRD" -a -r "$KERN" ]; then + echo "Copying kernel and initrd to ramdisk..." + mount -t tmpfs none /mnt/tmp + cp "$INITRD" /mnt/tmp/initrd.img + cp "$KERN" /mnt/tmp/bzImage + echo "Unmounting image..." + umount $ROOT else -echo "I couldn't find your kernel and/or initrd" -do_failure + echo "I couldn't find your kernel and/or initrd" + do_failure fi -if [ ! "$KCMD" ] -then -echo "You need to specify a kernel command line" -echo "I can't guess that" -do_failure +if [ -z "$KCMD" ]; then + echo "You need to specify a kernel command line. +I can't guess that" + do_failure fi -echo "Trying kexec..." umount /tmp + +echo "Trying kexec..." kexec --command-line="$KCMD" --initrd=/mnt/tmp/initrd.img -f /mnt/tmp/bzImage do_failure This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ppr...@us...> - 2010-07-11 22:56:48
|
Revision: 104 http://runnix.svn.sourceforge.net/runnix/?rev=104&view=rev Author: pprindeville Date: 2010-07-11 22:56:42 +0000 (Sun, 11 Jul 2010) Log Message: ----------- Handle 'doshell' better; reboot when shell exits; hide useless error messages. Modified Paths: -------------- trunk/target/generic/target_skeleton/runnix Modified: trunk/target/generic/target_skeleton/runnix =================================================================== --- trunk/target/generic/target_skeleton/runnix 2010-07-11 21:49:15 UTC (rev 103) +++ trunk/target/generic/target_skeleton/runnix 2010-07-11 22:56:42 UTC (rev 104) @@ -7,7 +7,7 @@ # ROOT is where the .run partition is mounted ROOT=/mnt/root -RUNVER=`cat /etc/runnix-release` +RUNVER="`cat /etc/runnix-release`" DRIVES="hda hdb hdc hdd hde hdf hdg hdh sda sdb sdc sdd" @@ -23,7 +23,7 @@ ifconfig $FAILDEV $FAILIP netmask $FAILNM if [ -n "$FAILGW" ]; then - route del -net default 2> /dev/null + route del -net default 2>/dev/null route add -net default gw $FAILGW fi @@ -39,8 +39,18 @@ dropbear -d /tmp/dss_key -r /tmp/rsa_key -E -P /tmp/dropbear.pid -p $SSHPORT fi + do_shell +} + +do_shell () { echo "Dropping to shell" - exec /bin/sh + + # need to get rid of message: + # /bin/sh: can't access tty; job control turned off + /bin/sh -i </dev/console >/dev/console 2>/dev/console + + # and reboot when done + reboot -f } echo " @@ -51,10 +61,10 @@ mount -t tmpfs none /tmp mkdir /tmp/etc -CMDLINE=`cat /proc/cmdline` +CMDLINE="`cat /proc/cmdline`" for x in $DRIVES; do - if mount -t iso9660 -o ro /dev/${x} $BASE >/dev/null; then + if mount -t iso9660 -o ro /dev/${x} $BASE 2>/dev/null; then if [ -f $BASE/runnix ]; then DEVICE=${x} RODEV=yes @@ -65,7 +75,7 @@ done for x in $DRIVES; do - if mount -t vfat /dev/${x}1 $BASE >/dev/null; then + if mount -t vfat /dev/${x}1 $BASE 2>/dev/null; then if [ -f $BASE/runnix ]; then DEVICE=${x} else @@ -79,7 +89,7 @@ # Loader not found if [ -z "$DEVICE" ]; then echo "Runnix device not found" - exec /bin/sh -i </dev/console + do_shell fi # get image name @@ -95,12 +105,11 @@ . $BASE/os/default.conf fi -if grep -q doshell /proc/cmdline; then - echo "Dropping to shell" - exec /bin/sh -i </dev/console +if echo "$CMDLINE" | grep -q doshell; then + do_shell fi -if grep -q dofail /proc/cmdline; then +if echo "$CMDLINE" | grep -q dofail; then do_failure fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2010-12-12 19:42:50
|
Revision: 115 http://runnix.svn.sourceforge.net/runnix/?rev=115&view=rev Author: abelbeck Date: 2010-12-12 19:42:43 +0000 (Sun, 12 Dec 2010) Log Message: ----------- More /runnix tweaks, rename 'dofail' command line option to 'doshell_ssh', better organize with functions Modified Paths: -------------- trunk/target/generic/target_skeleton/runnix Modified: trunk/target/generic/target_skeleton/runnix =================================================================== --- trunk/target/generic/target_skeleton/runnix 2010-12-12 16:36:57 UTC (rev 114) +++ trunk/target/generic/target_skeleton/runnix 2010-12-12 19:42:43 UTC (rev 115) @@ -11,11 +11,55 @@ DRIVES="hda hdb hdc hdd hde hdf hdg hdh sda sdb sdc sdd" -do_failure () { +setup_network () { + + if [ -z "$NDEV" -a -n "$1" ]; then + NDEV="$1" + fi + + #VLANS + for i in $VLANS; do + IF=`echo $i | cut -d. -f1` + VID=`echo $i | cut -d. -f2` + ifconfig $IF up + vconfig add $IF $VID > /dev/null + done + + if [ -n "$NDEV" ]; then + ifconfig lo up 127.0.0.1 + + if [ -n "$MAC" ]; then + ifconfig "$NDEV" hw ether "$MAC" + fi + + if [ "$IP" = "dhcp" ]; then + echo "Configuring $NDEV with DHCP..." + udhcpc -nq -s /etc/udhcpc.script -i "$NDEV" + else + ifconfig "$NDEV" inet "$IP" netmask "$NM" + route add -net default gw "$GW" + + for i in $DNS; do + echo "nameserver $i" >> /tmp/etc/resolv.conf + done + + fi + return 0 + fi + + return 1 +} + +setup_ssh () { + + if [ -z "$SSHPORT" -a -n "$1" ]; then + SSHPORT="$1" + fi + if [ -n "$SSHPORT" ]; then mount -t devpts devpts /dev/pts - echo "Generating keys" + echo "Generating keys..." dropbearkey -t rsa -f /tmp/rsa_key -s 1024 dropbearkey -t dss -f /tmp/dss_key -s 1024 @@ -35,10 +79,17 @@ touch /var/log/lastlog touch /var/log/wtmp - echo "Starting dropbear" + echo "Starting ssh..." dropbear -d /tmp/dss_key -r /tmp/rsa_key -E -P /tmp/dropbear.pid -p $SSHPORT fi + return 1 +} + +do_failure () { + + setup_ssh + do_shell } @@ -90,6 +141,7 @@ if [ -z "$DEVICE" ]; then echo "Runnix device not found" do_shell + # reboot fi # get image name @@ -106,47 +158,22 @@ fi if echo "$CMDLINE" | grep -q doshell; then + if echo "$CMDLINE" | grep -q doshell_ssh; then + if setup_network eth0; then + setup_ssh 2222 + fi + fi do_shell + # reboot fi -if echo "$CMDLINE" | grep -q dofail; then - do_failure -fi - if [ -z "$RUNIMG" ]; then RUNIMG="auto" fi #Network support - yikes -#VLANS -for i in $VLANS; do - IF=`echo $i | cut -d. -f1` - VID=`echo $i | cut -d. -f2` - ifconfig $IF up - vconfig add $IF $VID > /dev/null -done - -if [ -n "$NDEV" ]; then - ifconfig lo up 127.0.0.1 - - if [ -n "$MAC" ]; then - ifconfig "$NDEV" hw ether "$MAC" - fi - - if [ "$IP" = "dhcp" ]; then - echo "Configuring $NDEV with DHCP..." - udhcpc -nq -s /etc/udhcpc.script -i "$NDEV" - else - ifconfig "$NDEV" inet "$IP" netmask "$NM" - route add -net default gw "$GW" - - for i in $DNS; do - echo "nameserver $i" >> /tmp/etc/resolv.conf - done - - fi - +if setup_network; then if [ -n "$URL" ]; then echo "Checking for updates..." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2010-12-12 21:32:21
|
Revision: 117 http://runnix.svn.sourceforge.net/runnix/?rev=117&view=rev Author: abelbeck Date: 2010-12-12 21:32:15 +0000 (Sun, 12 Dec 2010) Log Message: ----------- /runnix script tweak, use -f to test for files instead of -r Modified Paths: -------------- trunk/target/generic/target_skeleton/runnix Modified: trunk/target/generic/target_skeleton/runnix =================================================================== --- trunk/target/generic/target_skeleton/runnix 2010-12-12 20:00:16 UTC (rev 116) +++ trunk/target/generic/target_skeleton/runnix 2010-12-12 21:32:15 UTC (rev 117) @@ -272,7 +272,7 @@ if [ -n "$INITRD" ]; then - if [ -r "$INITRD" ]; then + if [ -f "$INITRD" ]; then echo "Custom initrd $INITRD found" else INITRD=$BASE/os/initrd.img @@ -286,7 +286,7 @@ if [ -n "$KERN" ]; then - if [ -r "$KERN" ]; then + if [ -f "$KERN" ]; then echo "Custom kernel $KERN found" else KERN=$ROOT/boot/bzImage @@ -298,7 +298,7 @@ KERN=$ROOT/boot/bzImage fi -if [ -r "$INITRD" -a -r "$KERN" ]; then +if [ -f "$INITRD" -a -f "$KERN" ]; then echo "Copying kernel and initrd to ramdisk..." mount -t tmpfs none /mnt/tmp cp "$INITRD" /mnt/tmp/initrd.img This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2010-12-13 16:01:33
|
Revision: 122 http://runnix.svn.sourceforge.net/runnix/?rev=122&view=rev Author: abelbeck Date: 2010-12-13 16:01:27 +0000 (Mon, 13 Dec 2010) Log Message: ----------- Add descriptive example for SSH access in /runnix script Modified Paths: -------------- trunk/target/generic/target_skeleton/runnix Modified: trunk/target/generic/target_skeleton/runnix =================================================================== --- trunk/target/generic/target_skeleton/runnix 2010-12-13 02:37:06 UTC (rev 121) +++ trunk/target/generic/target_skeleton/runnix 2010-12-13 16:01:27 UTC (rev 122) @@ -79,8 +79,22 @@ touch /var/log/lastlog touch /var/log/wtmp - echo "Starting ssh..." + echo "Starting SSH..." dropbear -d /tmp/dss_key -r /tmp/rsa_key -E -P /tmp/dropbear.pid -p $SSHPORT + + myipv4="$(ip -o addr show dev "$NDEV" 2>/dev/null | awk '$3 == "inet" { split($4, field, "/"); print field[1]; }')" + if [ -n "$myipv4" ]; then + echo " +================== +SSH server started. +Example, copy a file to the RUNNIX base partition via a remote host: + +remote-host$ scp -P $SSHPORT filename root@$myipv4:/mnt/base/filename +(Password: runnix) +================== +" + fi + return 0 fi return 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2010-12-18 20:55:12
|
Revision: 142 http://runnix.svn.sourceforge.net/runnix/?rev=142&view=rev Author: abelbeck Date: 2010-12-18 20:55:06 +0000 (Sat, 18 Dec 2010) Log Message: ----------- Merge from 0.3 branch, specifing the address-family 'inet' for ifconfig fails Modified Paths: -------------- trunk/target/generic/target_skeleton/runnix Modified: trunk/target/generic/target_skeleton/runnix =================================================================== --- trunk/target/generic/target_skeleton/runnix 2010-12-18 20:48:06 UTC (rev 141) +++ trunk/target/generic/target_skeleton/runnix 2010-12-18 20:55:06 UTC (rev 142) @@ -36,7 +36,7 @@ echo "Configuring $NDEV with DHCP..." udhcpc -nq -s /etc/udhcpc.script -i "$NDEV" else - ifconfig "$NDEV" inet "$IP" netmask "$NM" + ifconfig "$NDEV" "$IP" netmask "$NM" route add -net default gw "$GW" for i in $DNS; do This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kr...@us...> - 2011-12-02 21:37:27
|
Revision: 171 http://runnix.svn.sourceforge.net/runnix/?rev=171&view=rev Author: krisk84 Date: 2011-12-02 21:37:21 +0000 (Fri, 02 Dec 2011) Log Message: ----------- add initramfs support to runnix Modified Paths: -------------- trunk/target/generic/target_skeleton/runnix Modified: trunk/target/generic/target_skeleton/runnix =================================================================== --- trunk/target/generic/target_skeleton/runnix 2011-05-04 17:39:35 UTC (rev 170) +++ trunk/target/generic/target_skeleton/runnix 2011-12-02 21:37:21 UTC (rev 171) @@ -275,6 +275,19 @@ . $BASE/os/$RUNIMG.conf fi +if [ "$INITRAMFS" ]; then + if [ "$INITRAMFS" = "YES" ]; then + if [ "$KCMD" ]; then + echo "Image is initramfs, booting now..." + kexec --command-line="$KCMD" -f $BASE/os/$RUNIMG + exit 0 + else + echo "You need to specify KCMD with initramfs" + do_failure + fi + fi +fi + if [ -z "$OFFSET" ]; then losetup /dev/loop0 $BASE/os/$RUNIMG else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |