init: Run ldconfig
[fedora-riscv.git] / init.sh
1 #!/bin/bash -
2 # Init script installed in stage3 disk image.
3
4 LD_LIBRARY_PATH=/usr/lib64
5 export LD_LIBRARY_PATH
6
7 # Root filesystem is mounted as ro, remount it as rw.
8 mount -o remount,rw /
9
10 # Mount standard filesystems.
11 mount -t proc /proc /proc
12 mount -t sysfs /sys /sys
13 mount -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run
14 mkdir -p /run/lock
15
16 # XXX devtmpfs
17
18 # Initialize dynamic linker cache.
19 ldconfig
20
21 echo
22 echo "Welcome to the Fedora/RISC-V stage3 disk image"
23 echo "https://fedoraproject.org/wiki/Architectures/RISC-V"
24 echo
25
26 PS1='stage3:\w\$ '
27 export PS1
28
29 # Run bash.
30 bash -i
31
32 # Sync disks and shut down.
33 sync
34 poweroff