1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
|
diff -BurN /dev/null/nslu/.unslung /mnt/nslu/.unslung
--- /dev/null/nslu/.unslung 1970-01-01 09:30:00.000000000 +0930
+++ /mnt/nslu/.unslung 2004-08-30 21:46:35.000000000 +0930
@@ -0,0 +1 @@
+V2.3R25-uNSLUng-X.Y
\ No newline at end of file
diff -BurN /dev/null/nslu/etc/passwd /mnt/nslu/etc/passwd
--- /dev/null/nslu/etc/passwd 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/passwd 2004-08-30 09:02:51.000000000 -0400
@@ -1,4 +1,4 @@
-root:WeeOvKUvbQ6nI:0:0:root:/root:/bin/sh
+root:t1PLUeOinN/eI:0:0:root:/root:/bin/sh
bin:x:1:1:bin:/bin:
lp:x:4:7:lp:/share/spool:
mail:x:8:12:mail:/var/spool/mail:
diff -BurN /dev/null/nslu/etc/profile /mnt/nslu/etc/profile
--- /dev/null/nslu/etc/profile 1969-12-31 19:00:00.000000000 -0500
+++ /mnt/nslu/etc/profile 2004-08-30 09:02:51.000000000 -0400
@@ -0,0 +1,2 @@
+export PATH=$PATH:/opt/bin:/opt/sbin:/opt/usr/bin:/opt/usr/sbin
+export LD_LIBRARY_PATH=/opt/lib
diff -BurN /dev/null/nslu/etc/rc /mnt/nslu/etc/rc
--- /dev/null/nslu/etc/rc 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc 2004-09-01 21:47:47.000000000 -0400
@@ -1,4 +1,7 @@
## Simple beta script to verify csr
+
+if ( [ -f /unslung/rc ] && . /unslung/rc ) ; then return 0 ; fi
+
/usr/bin/Set_Led r_blinking &
mount -t proc proc /proc
mount -o remount,rw /dev/root /
diff -BurN /dev/null/nslu/etc/rc.d/rc.1 /mnt/nslu/etc/rc.d/rc.1
--- /dev/null/nslu/etc/rc.d/rc.1 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.1 2004-09-01 21:56:17.000000000 -0400
@@ -1,5 +1,7 @@
#!/bin/sh
+if ( [ -f /unslung/rc.1 ] && . /unslung/rc.1 ) ; then return 0 ; fi
+
#/sbin/ifconfig ixp0 hw ether 00:C0:02:01:01:04
/bin/echo "Starting Set CGI_ds.conf:"; /etc/rc.d/rc.bootbin; check_status
@@ -17,6 +19,10 @@
/bin/echo "Starting Crond :"; . /etc/rc.d/rc.crond
/bin/echo "Starting Rest Task :"; . /etc/rc.d/rc.local
+if [ -f /.unslung ] ; then
+ /bin/echo "Starting UNSLUNG Packages:"; ( . /etc/rc.d/rc.unslung )
+fi
+
/usr/bin/Set_Led ready
/usr/bin/Set_Led beep1
/bin/echo "Checking disk status :"; /usr/sbin/CheckDiskFull 2 >/dev/null
diff -BurN /dev/null/nslu/etc/rc.d/rc.crond /mnt/nslu/etc/rc.d/rc.crond
--- /dev/null/nslu/etc/rc.d/rc.crond 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.crond 2004-09-01 21:56:37.000000000 -0400
@@ -1,5 +1,7 @@
#!/bin/sh
+if ( [ -r /unslung/rc.crond ] && . /unslung/rc.crond ) ; then return 0 ; fi
+
if [ -n "`pidof crond`" ] ;then
/bin/killall crond 2>/dev/null
fi
diff -BurN /dev/null/nslu/etc/rc.d/rc.halt /mnt/nslu/etc/rc.d/rc.halt
--- /dev/null/nslu/etc/rc.d/rc.halt 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.halt 2004-09-01 21:57:01.000000000 -0400
@@ -1,4 +1,7 @@
#!/bin/sh
+
+if ( [ -r /unslung/rc.halt ] && . /unslung/rc.halt ) ; then return 0 ; fi
+
/bin/killall -2 upnpd &>/dev/null
/bin/killall nmbd &>/dev/null
/bin/killall smbd &>/dev/null
diff -BurN /dev/null/nslu/etc/rc.d/rc.local /mnt/nslu/etc/rc.d/rc.local
--- /dev/null/nslu/etc/rc.d/rc.local 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.local 2004-09-01 21:57:17.000000000 -0400
@@ -1,5 +1,9 @@
#!/bin/sh
+
HOSTNAME=`hostname`
+
+if ( [ -r /unslung/rc.local ] && . /unslung/rc.local ) ; then return 0 ; fi
+
/usr/sbin/CheckResetButton 2>/dev/null
/usr/sbin/CheckPowerButton 2>/dev/null
/usr/sbin/do_umount 2>/dev/null
diff -BurN /dev/null/nslu/etc/rc.d/rc.modules /mnt/nslu/etc/rc.d/rc.modules
--- /dev/null/nslu/etc/rc.d/rc.modules 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.modules 2004-09-01 21:57:34.000000000 -0400
@@ -1,4 +1,7 @@
#!/bin/sh
+
+if ( [ -f /unslung/rc.modules ] && . /unslung/rc.modules ) ; then return 0 ; fi
+
insmod pbuttons &>/dev/null
insmod rbuttons &>/dev/null
insmod x1226-rtc &>/dev/null
diff -BurN /dev/null/nslu/etc/rc.d/rc.network /mnt/nslu/etc/rc.d/rc.network
--- /dev/null/nslu/etc/rc.d/rc.network 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.network 2004-09-01 21:57:46.000000000 -0400
@@ -1,3 +1,6 @@
#!/bin/sh
+
+if ( [ -f /unslung/rc.network ] && . /unslung/rc.network ) ; then return 0 ; fi
+
/sbin/ifup; #check_status
/bin/echo "call rc.network!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
diff -BurN /dev/null/nslu/etc/rc.d/rc.quickset /mnt/nslu/etc/rc.d/rc.quickset
--- /dev/null/nslu/etc/rc.d/rc.quickset 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.quickset 2004-09-01 21:57:57.000000000 -0400
@@ -1,3 +1,6 @@
#!/bin/sh
+
+if ( [ -f /unslung/rc.quickset ] && . /unslung/rc.quickset ) ; then return 0 ; fi
+
/usr/sbin/QuickSet; check_status
/usr/sbin/USB_Detect; check_status
diff -BurN /dev/null/nslu/etc/rc.d/rc.quota /mnt/nslu/etc/rc.d/rc.quota
--- /dev/null/nslu/etc/rc.d/rc.quota 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.quota 2004-09-01 21:58:08.000000000 -0400
@@ -1,5 +1,7 @@
#!/bin/sh
+if ( [ -f /unslung/rc.quota ] && . /unslung/rc.quota ) ; then return 0 ; fi
+
# Check and turn on disk quota.
if [ -x "/usr/bin/quotacheck" ]
then
diff -BurN /dev/null/nslu/etc/rc.d/rc.reboot /mnt/nslu/etc/rc.d/rc.reboot
--- /dev/null/nslu/etc/rc.d/rc.reboot 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.reboot 2004-09-01 21:58:19.000000000 -0400
@@ -1,4 +1,7 @@
#!/bin/sh
+
+if ( [ -r /unslung/rc.reboot ] && . /unslung/rc.reboot ) ; then return 0 ; fi
+
/bin/killall -2 upnpd 2>/dev/null
sleep 4
/sbin/ifdown ixp0
diff -BurN /dev/null/nslu/etc/rc.d/rc.reset_usrgrpshare /mnt/nslu/etc/rc.d/rc.reset_usrgrpshare
--- /dev/null/nslu/etc/rc.d/rc.reset_usrgrpshare 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.reset_usrgrpshare 2004-09-01 21:58:36.000000000 -0400
@@ -1,2 +1,5 @@
#!/bin/sh
+
+if ( [ -f /unslung/rc.reset_usrgrpshare ] && . /unslung/rc.reset_usrgrpshare ) ; then return 0 ; fi
+
/usr/sbin/reset_ugs;
diff -BurN /dev/null/nslu/etc/rc.d/rc.rstimezone /mnt/nslu/etc/rc.d/rc.rstimezone
--- /dev/null/nslu/etc/rc.d/rc.rstimezone 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.rstimezone 2004-09-01 21:58:47.000000000 -0400
@@ -1,4 +1,7 @@
#!/bin/sh
+
+if ( [ -f /unslung/rc.rstimezone ] && . /unslung/rc.rstimezone ) ; then return 0 ; fi
+
#TIME=`/usr/sbin/hwclock`
/usr/sbin/Set_TimeZone >/dev/null
#/bin/date -s "$TIME"
diff -BurN /dev/null/nslu/etc/rc.d/rc.samba /mnt/nslu/etc/rc.d/rc.samba
--- /dev/null/nslu/etc/rc.d/rc.samba 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.samba 2004-09-01 21:58:57.000000000 -0400
@@ -1,4 +1,7 @@
#!/bin/sh
+
+if ( [ -f /unslung/rc.samba ] && . /unslung/rc.samba ) ; then return 0 ; fi
+
if [ -n "`pidof smbd`" ] ; then
killall smbd 2>/dev/null
fi
diff -BurN /dev/null/nslu/etc/rc.d/rc.sysinit /mnt/nslu/etc/rc.d/rc.sysinit
--- /dev/null/nslu/etc/rc.d/rc.sysinit 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.sysinit 2004-09-01 21:59:04.000000000 -0400
@@ -1,7 +1,16 @@
#!/bin/sh
+
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+if [ -f /.unslung ] ; then
+ export PATH=${PATH}:/opt/bin:/opt/sbin:/opt/usr/bin:/opt/usr/sbin
+fi
+
. /etc/rc.d/rc.functions
. /etc/sysconfig/network
+
+if ( [ -f /unslung/rc.sysinit ] && . /unslung/rc.sysinit ) ; then return 0 ; fi
+
mkdir -p /var/lock/samba >/dev/null
/bin/echo "Creating ramfs for /var/lock/samba:"; mount -t ramfs none /var/lock/samba -o maxsize=64
/bin/echo "Limit the space of log folder:"; mount -t ramfs none /var/log -o maxsize=128
diff -BurN /dev/null/nslu/etc/rc.d/rc.thttpd /mnt/nslu/etc/rc.d/rc.thttpd
--- /dev/null/nslu/etc/rc.d/rc.thttpd 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.thttpd 2004-09-01 21:59:13.000000000 -0400
@@ -1,4 +1,7 @@
#!/bin/sh
+
+if ( [ -f /unslung/rc.thttpd ] && . /unslung/rc.thttpd ) ; then return 0 ; fi
+
if [ -n "`pidof thttpd`" ] ;then
/bin/killall thttpd 2>/dev/null
fi
diff -BurN /dev/null/nslu/etc/rc.d/rc.xinetd /mnt/nslu/etc/rc.d/rc.xinetd
--- /dev/null/nslu/etc/rc.d/rc.xinetd 2004-07-27 23:37:55.000000000 -0400
+++ /mnt/nslu/etc/rc.d/rc.xinetd 2004-09-01 21:59:34.000000000 -0400
@@ -1,4 +1,7 @@
#!/bin/sh
+
+if ( [ -f /unslung/rc.xinetd ] && . /unslung/rc.xinetd ) ; then return 0 ; fi
+
if [ -n "`pidof inetd`" ] ;then
killall inetd 2>/dev/null
# killall -9 inetd &>/dev/null
diff -BurN /dev/null/nslu/usr/local/passwd /mnt/nslu/usr/local/passwd
--- /dev/null/nslu/usr/local/passwd 2004-07-27 23:37:56.000000000 -0400
+++ /mnt/nslu/usr/local/passwd 2004-08-30 09:02:51.000000000 -0400
@@ -1,4 +1,4 @@
-root:WeeOvKUvbQ6nI:0:0:root:/root:/bin/sh
+root:t1PLUeOinN/eI:0:0:root:/root:/bin/sh
bin:x:1:1:bin:/bin:
lp:x:4:7:lp:/share/spool:
mail:x:8:12:mail:/var/spool/mail:
--- /dev/null/nslu/etc/rc.d/rc.sysinit 2004-11-09 21:45:46.000000000 +1030
+++ /mnt/nslu/etc/rc.d/rc.sysinit 2004-11-09 21:41:47.000000000 +1030
@@ -12,8 +12,18 @@
if ( [ -f /unslung/rc.sysinit ] && . /unslung/rc.sysinit ) ; then return 0 ; fi
mkdir -p /var/lock/samba >/dev/null
-/bin/echo "Creating ramfs for /var/lock/samba:"; mount -t ramfs none /var/lock/samba -o maxsize=64
-/bin/echo "Limit the space of log folder:"; mount -t ramfs none /var/log -o maxsize=128
+
+/bin/echo "Creating ramfs for /dev:"
+/bin/mount -t ramfs none /mnt/tmpmnt
+/bin/cp -r /dev/* /mnt/tmpmnt/
+/bin/mount -o bind /mnt/tmpmnt /dev
+/bin/umount /mnt/tmpmnt
+/bin/echo "Creating ramfs for /var:"
+/bin/mount -t ramfs none /mnt/tmpmnt
+/bin/cp -r /var/* /mnt/tmpmnt/
+/bin/mount -o bind /mnt/tmpmnt /var
+/bin/umount /mnt/tmpmnt
+
mkdir -p /var/log/samba >/dev/null
touch /var/log/server.log >/dev/null
chmod 755 /var/log/samba >/dev/null
--- /dev/null/nslu/etc/rc.d/rc.1.orig 2004-11-09 21:45:52.000000000 +1030
+++ /mnt/nslu/etc/rc.d/rc.1 2004-11-09 21:44:27.000000000 +1030
@@ -5,6 +5,14 @@
#/sbin/ifconfig ixp0 hw ether 00:C0:02:01:01:04
/bin/echo "Starting Set CGI_ds.conf:"; /etc/rc.d/rc.bootbin; check_status
+if ( [ -f /share/hdd/conf/.ext3flash ] ) ; then
+ /bin/echo "Remounting /dev/sda1 as ext3flash:"
+ /bin/mount -o remount,rw,noatime /dev/sda1
+ /bin/echo "Remounting /dev/sda2 as ext3flash:"
+ /bin/mount -o remount,rw,noatime /dev/sda2
+ /bin/echo "Removing swap from ext3flash:"
+ /sbin/swapoff /dev/sda3
+fi
/bin/echo "Restore time and timezone:"; /etc/rc.d/rc.rstimezone; check_status
/bin/echo "Restore usrgrpshares:"; /etc/rc.d/rc.reset_usrgrpshare; check_status
--- /dev/null/nslu/etc/rc.d/rc.quota 2004-11-11 00:05:21.000000000 +1030
+++ /mnt/nslu/etc/rc.d/rc.quota 2004-11-11 00:04:52.000000000 +1030
@@ -10,6 +10,11 @@
echo "Done."
fi
+if ( [ -f /share/hdd/conf/.ext3flash ] ) ; then
+ /bin/echo "Remounting /dev/sda1 as ext3flash:"
+ /bin/mount -o remount,rw,noatime /dev/sda1
+fi
+
if [ -x "/usr/bin/quotaon" ]
then
echo "Turning on quota."
|