3 # Create bootstrap information files -- prelude to creating a
8 # Kern Sibbald, December MMII
9 # This source distributed under the GPL
17 echo "This is the Solaris script. Please use the Linux version."
23 echo "This is preliminary code and not yet"
24 echo "tested or guaranteed to work ..."
29 echo "This code is not yet adapted to this OS"
34 echo "Unknown operating system type: $host"
38 uid=`id | cut -d'(' -f1 | cut -d'=' -f2`
39 if [ "$uid" -ne "0" ]; then
41 echo "You need to be root to run this, otherwise"
42 echo "the results are not optimal. Continuing anyway ..."
47 # First collect information
49 echo "Begin collecting system info"
53 if [ -e /etc/fstab ] ; then
54 cp /etc/fstab fstab.bsi
56 if [ -e /etc/vfstab ] ; then
57 cp /etc/vfstab vfstab.bsi
61 ../SysAudit >sysaudit.bsi
63 ifconfig -a >ifconfig.bsi
66 echo "Done collecting info. Building scripts ..."
69 # Done collecting information
76 # Create network start script
78 dev=`cat $di/ifconfig.bsi | grep BROADCAST | awk -F: '{print $1}' | head -1`
79 ip=`ifconfig $dev | grep inet | awk '{print $2}'`
80 cat >start_network <<END_OF_DATA
83 # Start network -- created by getdiskinfo
88 ifconfig \$dev up \$ip
89 route add default gw \$ip dev \$dev
92 chmod 755 start_network