Menu

#26 bugs in initrd

open
nobody
None
5
2004-10-15
2004-10-15
Anonymous
No

Hello maintainer (Mathew Franz) of trinux,
I think, I have found some small bugs in the initrd
(version of 24th may, perhaps in some initrd before):

1. In the file linuxrc I changed conf to config
2. In the file sbin/chkfixed I deleted the block
for i in $partitions... , because it exists 2times.
3. In the file sbin/net-start I changed the
variable $face to $i, because $face does not exist.

I hope, this helps you und you can integrate it in the
new version. I think, trinux is very usefull and the scripts
are very good documented. Therefore it is easy to
customize it for yourself.

Best Greetings
Uwe Sarnowski

P.S.
here is the complete patch-file (mnt1 is original 24th
May; mnt2 is corrected)

diff -Nur mnt1/linuxrc mnt2/linuxrc
--- mnt1/linuxrc Tue May 11 13:48:01 2004
+++ mnt2/linuxrc Fri Oct 15 11:50:38 2004
@@ -801,9 +801,9 @@
echo "Preparing to load kernel
packages from $part"
if cd /mnt/trinux/kpkg 2> /dev/null
then
- if [ -
f /etc/tux/conf/kpkglist ]
+ if [ -
f /etc/tux/config/kpkglist ]
then
- for i in
`cat /etc/tux/conf/pkglist`
+ for i in
`cat /etc/tux/config/pkglist`
do
pkgadd $i
done
@@ -828,9 +828,9 @@

if cd /mnt/trinux/pkg 2> /dev/null
then
- if [ -f /etc/tux/conf/pkglist ]
+ if [ -
f /etc/tux/config/pkglist ]
then
- for i in
`cat /etc/tux/conf/pkglist`
+ for i in
`cat /etc/tux/config/pkglist`
do
pkgadd $i
done
diff -Nur mnt1/sbin/chkfixed mnt2/sbin/chkfixed
--- mnt1/sbin/chkfixed Sun May 23 17:32:40 2004
+++ mnt2/sbin/chkfixed Fri Oct 15 11:50:50 2004
@@ -49,17 +49,6 @@
fi
done

-for i in $partitions
-do
-
- if echo "$partitions" | grep unknown
> /dev/null
- then
- echo "Unkown partition"
- else
- echo $i >> /tmp/partitions
- fi
-done
-

for i in $scsiparts
do
diff -Nur mnt1/sbin/net-start mnt2/sbin/net-start
--- mnt1/sbin/net-start Sun Jul 20 18:24:18 2003
+++ mnt2/sbin/net-start Fri Oct 15 12:54:20 2004
@@ -70,7 +70,7 @@

if [ "$i" = "eth0" ]
then
- ifconfig $face | grep inet | cut -d":" -
f2 | cut -d" " -f1 | grep -v 127.0.0.1 > /etc/proc/ipaddr
+ ifconfig $i | grep inet | cut -d":" -f2 |
cut -d" " -f1 | grep -v 127.0.0.1 > /etc/proc/ipaddr
ln -sf /etc/proc/ipaddr /etc/proc/$i
nslookup `cat /etc/proc/ipaddr` |
grep -v default | grep Name | cut -d":" -f2 | tr -d ' ' |
tail -n 1 > /etc/proc/hostname
fi

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.