comparison images/lfs-bootstrap/mnt/build/setup.nosrc @ 0:bcd2e358d57f

Start by copying the existing control image building infrastructure from Aboriginal Linux, and shuffling the layout around a bit.
author Rob Landley <rob@landley.net>
date Sun, 03 Jul 2011 17:23:26 -0500
parents
children 7e6935234d63
comparison
equal deleted inserted replaced
-1:000000000000 0:bcd2e358d57f
1 #!/bin/bash
2
3 set +h
4
5 # Basic setup. Create directories not in the aboriginal base system.
6
7 cd / &&
8
9 # The first package (zlib) dies with hush.
10
11 ln -sf bash /bin/sh &&
12
13 mkdir -p boot etc/opt opt media/floppy media/cdrom srv var/tmp &&
14 chmod 0750 root &&
15 chmod 1777 tmp var/tmp &&
16 rm -rf /usr/local &&
17 ln -sf . usr/local &&
18 cd usr/share &&
19 mkdir -p doc info locale man misc terminfo zoneinfo &&
20 cd ../.. &&
21 ln -sf share/man share/doc share/info usr &&
22 cd var &&
23 mkdir -p lib lock log mail run spool opt cache local &&
24 cd lib &&
25 mkdir -p misc locate &&
26 cd ../.. &&
27
28 cat > etc/passwd << "EOF" &&
29 root:x:0:0:root:/root:/bin/bash
30 bin:x:1:1:bin:/dev/null:/bin/false
31 nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
32 guest:x:500:500:guest:/home/guest:/bin/sh
33 EOF
34
35 cat > etc/group << "EOF" &&
36 root:x:0:
37 bin:x:1:
38 sys:x:2:
39 kmem:x:3:
40 tty:x:4:
41 tape:x:5:
42 daemon:x:6:
43 floppy:x:7:
44 disk:x:8:
45 lp:x:9:
46 dialout:x:10:
47 audio:x:11:
48 video:x:12:
49 utmp:x:13:
50 usb:x:14:
51 cdrom:x:15:
52 mail:x:34:
53 nogroup:x:99:
54 guest:x:500:
55 EOF
56
57 touch /var/run/utmp /var/log/btmp /var/log/lastlog /var/log/wtmp &&
58 chgrp -v utmp /var/run/utmp /var/log/lastlog &&
59 chmod -v 664 /var/run/utmp /var/log/lastlog