/[baselayout]/branches/rc-scripts-1_6/sbin/MAKEDEV-gentoo.patch
Gentoo

Diff of /branches/rc-scripts-1_6/sbin/MAKEDEV-gentoo.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 756 Revision 1558
1--- MAKEDEV.orig 2003-03-09 08:12:11.000000000 +0200 1--- MAKEDEV
2+++ MAKEDEV 2003-03-09 08:26:25.000000000 +0200 2+++ MAKEDEV
3@@ -260,48 +260,65 @@ 3@@ -102,8 +102,8 @@
4
5 if [ "$opt_V" ]
6 then
7- echo "This is Debian MAKEDEV. For version info, try 'dpkg --list makedev'"
8- echo "See /usr/share/doc/makedev/ for more information on Debian MAKEDEV."
9+ echo "This is MAKEDEV based on Debian's makedev_2.3.1-78."
10+ echo "See the MAKEDEV(8) manpage for more information."
11 exit 0
12 fi
13
14@@ -308,60 +308,26 @@
15 done
16 }
17
18+get_arch() {
19+ local a=`uname -m`
20+ case `uname -m` in
21+ arm*) echo arm;;
22+ i?86) echo i386;;
23+ ppc*) echo powerpc;;
24+ s390*) echo s390;;
25+ sh*) echo sh;;
26+ x86_64) echo i386;;
27+ # alpha|hppa|ia64|m68k|mips|sparc
28+ *) echo $a;;
29+ esac
30+}
31+
32 for arg in $*
33 do
4 # case `cvt $arg` in 34 # case `cvt $arg` in
5 case $arg in 35 case $arg in
6 generic) 36 generic)
7- # pick the right generic-<arch> using dpkg's knowledge 37- # pick the right generic-<arch> using dpkg's knowledge
8- case `dpkg --print-installation-architecture` in 38- case `dpkg --print-installation-architecture` in
16- $0 $opts generic-hppa 46- $0 $opts generic-hppa
17- ;; 47- ;;
18- i386) 48- i386)
19- $0 $opts generic-i386 49- $0 $opts generic-i386
20- ;; 50- ;;
51- amd64)
52- $0 $opts generic-i386
53- ;;
21- ia64) 54- ia64)
22- $0 $opts generic-ia64 55- $0 $opts generic-ia64
23- ;; 56- ;;
24- m68k) 57- m68k)
25- $0 $opts generic-m68k 58- $0 $opts generic-m68k
31- $0 $opts generic-mipsel 64- $0 $opts generic-mipsel
32- ;; 65- ;;
33- powerpc) 66- powerpc)
34- $0 $opts generic-powerpc 67- $0 $opts generic-powerpc
35- ;; 68- ;;
69- ppc64)
70- $0 $opts generic-powerpc
71- ;;
36- s390) 72- s390)
37- $0 $opts generic-s390 73- $0 $opts generic-s390
74- ;;
75- sh*)
76- $0 $opts generic-sh
38- ;; 77- ;;
39- sparc) 78- sparc)
40- $0 $opts generic-sparc 79- $0 $opts generic-sparc
41- ;; 80- ;;
42- *) 81- *)
43- echo "$0: no support for generic on this arch" >&2 82- echo "$0: no support for generic on this arch" >&2
44- exit 1 83- exit 1
45- ;; 84- ;;
46- esac 85- esac
47+ if [ -n "`which dpkg 2> /dev/null`" ]
48+ then
49+ # pick the right generic-<arch> using dpkg's knowledge
50+ case `dpkg --print-installation-architecture` in
51+ alpha)
52+ $0 $opts generic-alpha
53+ ;;
54+ arm)
55+ $0 $opts generic-arm
56+ ;;
57+ hppa)
58+ $0 $opts generic-hppa
59+ ;;
60+ i386)
61+ $0 $opts generic-i386
62+ ;;
63+ ia64)
64+ $0 $opts generic-ia64
65+ ;;
66+ m68k)
67+ $0 $opts generic-m68k
68+ ;;
69+ mips)
70+ $0 $opts generic-mips
71+ ;;
72+ mipsel)
73+ $0 $opts generic-mipsel
74+ ;;
75+ powerpc)
76+ $0 $opts generic-powerpc
77+ ;;
78+ s390)
79+ $0 $opts generic-s390
80+ ;;
81+ sparc)
82+ $0 $opts generic-sparc 86+ $0 $opts generic-`get_arch`
83+ ;;
84+ *)
85+ echo "$0: no support for generic on this arch" >&2
86+ exit 1
87+ ;;
88+ esac
89+ else
90+ $0 $opts std
91+ $0 $opts fd
92+ $0 $opts fd0 fd1
93+ $0 $opts hda hdb
94+ $0 $opts xda xdb
95+ $0 $opts sda sdb
96+ $0 $opts pty
97+ $0 $opts console
98+ $0 $opts ttyS0 ttyS1 ttyS2 ttyS3
99+ $0 $opts busmice
100+ $0 $opts lp
101+ $0 $opts par
102+ fi
103 ;; 87 ;;
104 generic-alpha) 88 generic-alpha)
105+ export MDARCH="alpha"
106 $0 $opts std 89 $0 $opts std
107 $0 $opts fd 90@@ -596,6 +562,10 @@
108 $0 $opts fd0 fd1 91 symlink mouse sunmouse
109@@ -321,6 +338,7 @@ 92 makedev openprom c 10 139 root root 0664
110 $0 $opts fb
111 ;; 93 ;;
112 generic-arm) 94+ generic-*)
113+ export MDARCH="arm" 95+ echo "$0: no support for generic on this arch" >&2
114 $0 $opts std 96+ exit 1
115 $0 $opts fd 97+ ;;
116 $0 $opts fd0 fd1 98 local)
117@@ -340,6 +358,7 @@ 99 $0.local $opts
118 $0 $opts fb
119 ;; 100 ;;
120 generic-hppa)
121+ export MDARCH="hppa"
122 $0 $opts std
123 $0 $opts fd
124 $0 $opts fd0 fd1
125@@ -358,6 +377,7 @@
126 $0 $opts rtc
127 ;;
128 generic-i386)
129+ export MDARCH="i386"
130 $0 $opts std
131 $0 $opts fd
132 $0 $opts fd0 fd1
133@@ -380,6 +400,7 @@
134 $0 $opts lmscd sbpcd aztcd bpcd dac960 ida ataraid cciss
135 ;;
136 generic-ia64)
137+ export MDARCH="ia64"
138 $0 $opts std
139 $0 $opts fd
140 $0 $opts fd0 fd1
141@@ -400,6 +421,7 @@
142 $0 $opts efirtc
143 ;;
144 generic-m68k)
145+ export MDARCH="m68k"
146 $0 $opts std
147 $0 $opts fd
148 $0 $opts fd0 fd1
149@@ -418,6 +440,7 @@
150 $0 $opts fb
151 ;;
152 generic-mips)
153+ export MDARCH="mips"
154 $0 $opts std
155 $0 $opts fd
156 $0 $opts fd0 fd1
157@@ -436,6 +459,7 @@
158 $0 $opts busmice
159 ;;
160 generic-mipsel)
161+ export MDARCH="mipsel"
162 $0 $opts std
163 $0 $opts fd
164 $0 $opts fd0 fd1
165@@ -454,6 +478,7 @@
166 $0 $opts rtc
167 ;;
168 generic-powerpc)
169+ export MDARCH="powerpc"
170 $0 $opts std
171 $0 $opts fd
172 $0 $opts fd0 fd1
173@@ -478,6 +503,7 @@
174 $0 $opts isdn-io
175 ;;
176 generic-s390)
177+ export MDARCH="s390"
178 $0 $opts std
179 $0 $opts fd
180 $0 $opts dasda dasdb dasdc dasdd dasde dasdf dasdg dasdh \
181@@ -489,6 +515,7 @@
182 $0 $opts rtc
183 ;;
184 generic-sparc)
185+ export MDARCH="sparc"
186 $0 $opts std
187 $0 $opts fd0-bare fd1-bare
188 $0 $opts hda hdb hdc hdd
189@@ -601,8 +628,19 @@ 101@@ -690,8 +660,7 @@
190 done 102 done
191 ;; 103 ;;
192 adb) 104 adb)
193- # pick the right arch device using dpkg's knowledge 105- # pick the right arch device using dpkg's knowledge
194- case `dpkg --print-installation-architecture` in 106- case `dpkg --print-installation-architecture` in
195+ myarch=
196+
197+ if [ -n "`which dpkg 2> /dev/null`" ]
198+ then
199+ # pick the right arch device using dpkg's knowledge
200+ myarch="`dpkg --print-installation-architecture`"
201+
202+ elif [ -n "${MDARCH}" ]
203+ then
204+ myarch="${MDARCH}"
205+ fi
206+
207+ case $myarch in 107+ case `get_arch` in
208 powerpc) 108 powerpc)
209 # ADB bus devices (char) 109 # ADB bus devices (char)
210 makedev adb c 56 0 $mouse 110 makedev adb c 56 0 $mouse

Legend:
Removed from v.756  
changed lines
  Added in v.1558

  ViewVC Help
Powered by ViewVC 1.1.20