Subversion Repositories DevTools

Rev

Rev 6821 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6821 Rev 6823
Line 227... Line 227...
227
mname="$mname"
227
mname="$mname"
228
mode="$mode"
228
mode="$mode"
229
pkgServer="$pkgServer"
229
pkgServer="$pkgServer"
230
hereData
230
hereData
231
 
231
 
-
 
232
#
-
 
233
#   Set the required Mode
-
 
234
#
-
 
235
autoHome=false
-
 
236
perthNis=false
-
 
237
addUser=false
-
 
238
reboot=false
-
 
239
 
-
 
240
if [ "$mode" = "Stand Alone VM" ] ; then
-
 
241
    autoHome=false
-
 
242
    perthNis=false
-
 
243
    addUser=true
-
 
244
 
-
 
245
elif [ "$mode" = "Local Home" ] ; then
-
 
246
    autoHome=false
-
 
247
    perthNis=true
-
 
248
 
-
 
249
else
-
 
250
    autoHome=true
-
 
251
    perthNis=true
-
 
252
fi
-
 
253
 
-
 
254
#
-
 
255
#   Create local user if need be
-
 
256
#   Note: There is no need to create a local home directory for local users
-
 
257
#         as Ubuntu appears to do this on the fly.
-
 
258
#
-
 
259
echo "Configure Local User"
-
 
260
if $addUser; then
-
 
261
    kuser "--title=Configure local user" "--caption=Don't forget the passwd"
-
 
262
fi
-
 
263
 
-
 
264
#
-
 
265
#   Reboot the system
-
 
266
#   If manually invoked then give the user the option of aborting the boot
-
 
267
#
-
 
268
ktype=yesno
-
 
269
[ -z "$startupMode" ] && ktype=msgbox
-
 
270
kdialog --title "$TITLE" --$ktype "The system will now reboot in order for the changes to take effect"
-
 
271
if [ $? -ne 1 ]; then
-
 
272
    reboot=true
-
 
273
fi
-
 
274
 
-
 
275
 
232
################################################################################
276
################################################################################
233
#
277
#
234
#   Perform the initialisation
278
#   Perform the initialisation
235
#
279
#
236
echo "--------------------------------"
280
echo "--------------------------------"
Line 259... Line 303...
259
echo $mname > /etc/hostname
303
echo $mname > /etc/hostname
260
sed -i /etc/hosts -e "s~^127\.0\.1\.1.*~127.0.1.1\t$mname~"
304
sed -i /etc/hosts -e "s~^127\.0\.1\.1.*~127.0.1.1\t$mname~"
261
hostname -b -F /etc/hostname
305
hostname -b -F /etc/hostname
262
 
306
 
263
#
307
#
264
#   Set the required Mode
-
 
265
#
-
 
266
autoHome=false
-
 
267
perthNis=false
-
 
268
addUser=false
-
 
269
 
-
 
270
if [ "$mode" = "Stand Alone VM" ] ; then
-
 
271
    autoHome=false
-
 
272
    perthNis=false
-
 
273
    addUser=true
-
 
274
 
-
 
275
elif [ "$mode" = "Local Home" ] ; then
-
 
276
    autoHome=false
-
 
277
    perthNis=true
-
 
278
 
-
 
279
else
-
 
280
    autoHome=true
-
 
281
    perthNis=true
-
 
282
fi
-
 
283
 
-
 
284
#
-
 
285
#   Configure NIS
308
#   Configure NIS
286
#
309
#
287
echo "Configure NIS"
310
echo "Configure NIS"
288
if $perthNis; then
311
if $perthNis; then
289
    echo "Enable yp binding"
312
    echo "Enable yp binding"
Line 326... Line 349...
326
#   Note: This does not appear to stop the automounter
349
#   Note: This does not appear to stop the automounter
327
#         May not be an issue as we are about to reboot
350
#         May not be an issue as we are about to reboot
328
systemctl stop autofs 
351
systemctl stop autofs 
329
 
352
 
330
#
353
#
331
#   Create local user if need be
-
 
332
#   Note: There is no need to create a local home directory for local users
-
 
333
#         as Ubuntu appears to do this on the fly.
-
 
334
#
-
 
335
echo "Configure Local User"
-
 
336
if $addUser; then
-
 
337
    kuser "--title=Configure local user" "--caption=Don't forget the passwd"
-
 
338
fi
-
 
339
 
-
 
340
#
-
 
341
#   Configure the package server
354
#   Configure the package server
342
#
355
#
343
echo "Configure Package Server"
356
echo "Configure Package Server"
344
sed -i /etc/profile.d/jats.sh -e "s~^\(GBE_DPKG=/net\)/\([^/]*\)/\(.*\)~\1/$pkgServer/\3~"
357
sed -i /etc/profile.d/jats.sh -e "s~^\(GBE_DPKG=/net\)/\([^/]*\)/\(.*\)~\1/$pkgServer/\3~"
345
 
358
 
Line 359... Line 372...
359
 
372
 
360
#
373
#
361
#   Reboot the system
374
#   Reboot the system
362
#   If manually invoked then give the user the option of aborting the boot
375
#   If manually invoked then give the user the option of aborting the boot
363
#
376
#
364
ktype=yesno
-
 
365
[ -z "$startupMode" ] && ktype=msgbox
-
 
366
kdialog --title "$TITLE" --$ktype "The system will now reboot in order for the changes to take effect"
-
 
367
if [ $? -ne 1 ]; then
377
if $reboot ; then
368
    echo "Reboot the system"
378
    echo "Reboot the system"
369
    reboot
379
    reboot
370
    echo "Reboot failed. Command returned"
380
    echo "Reboot failed. Command returned"
371
fi
381
fi
372
echo "Script complete"
382
echo "Script complete"