source: src/router/misc/rootprep.sh

Last change on this file was 17227, checked in by BrainSlayer, 11 months ago

fix link

File size: 1.2 KB
Line 
1#!/bin/bash
2#
3# Miscellaneous steps to prepare the root filesystem
4#
5# Copyright 2001-2003, Broadcom Corporation
6# All Rights Reserved.
7#
8# THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
9# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
10# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
11# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
12#
13# $Id: rootprep.sh,v 1.1.1.5 2003/10/29 03:06:28 honor Exp $
14#
15
16ROOTDIR=$PWD
17
18#jffs2
19mkdir -p jffs
20mkdir -p mmc
21mkdir -p usr
22mkdir -p usr/local
23mkdir -p opt
24mkdir -p sys
25cd usr/local
26ln -sf /tmp/share share
27cd ../../
28mkdir -p usr/bin
29cd usr/bin
30ln -sf /opt/bin/perl perl
31cd ../../
32mkdir -p bin
33cd bin
34ln -sf /opt/bin/bash bash
35cd ../
36# tmp
37mkdir -p tmp
38ln -sf tmp/var var
39
40(cd $ROOTDIR/usr && ln -sf ../tmp)
41
42# dev
43mkdir -p dev
44
45# etc
46mkdir -p etc
47echo "/jffs/lib" > etc/ld.so.conf
48echo "/jffs/usr/lib" >> etc/ld.so.conf
49echo "/jffs/usr/local/lib" >> etc/ld.so.conf
50echo "/mmc/lib" >> etc/ld.so.conf
51echo "/mmc/usr/lib" >> etc/ld.so.conf
52echo "/mmc/usr/local/lib" >> etc/ld.so.conf
53echo "/lib" >> etc/ld.so.conf
54echo "/usr/lib" >> etc/ld.so.conf
55/sbin/ldconfig -r $ROOTDIR
56
57# miscellaneous
58ln -sf tmp/mnt mnt
59mkdir -p proc
Note: See TracBrowser for help on using the repository browser.