summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2010-12-13 00:47:29 -0800
committerSaul Wold <sgw@linux.intel.com>2010-12-14 08:53:19 -0800
commit526da3b499d3259c9ded58f7dc9dd20af2985a9c (patch)
treea3034a267c91afde8c7773c926d48fabe203799e /meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh
parentb3b25c84e9e6551d6fa0b01111fc1464ca945886 (diff)
downloadpoky-526da3b499d3259c9ded58f7dc9dd20af2985a9c.tar.gz
lsbsetup: fix install process
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh')
-rw-r--r--meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh197
1 files changed, 197 insertions, 0 deletions
diff --git a/meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh b/meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh
new file mode 100644
index 0000000000..4bf7686c2e
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh
@@ -0,0 +1,197 @@
1#!/bin/bash
2
3# Copyright (c) 2005-2010 Wind River Systems, Inc.
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License version 2 as
7# published by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12# See the GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18##Prepare Steps
19#Steps 0; Confirm the installed LSB Packages
20
21if [ ! -f /opt/lsb/test/manager/bin/dist-checker-start.pl ]
22then
23 if [ -d /lsb-dist-testkit ];then
24 cd /lsb-dist-testkit && sh install.sh
25 else
26 echo "Please install the realted LSB Packages"
27 exit 1
28 fi
29fi
30
31#Steps 1; Deleted existed user tester
32id tester
33if [ $? -eq 0 ]
34then
35 echo "User tester was existed"
36 echo -n "Deleted tester(yes/no):"
37 read INPUT
38case $INPUT in
39yes|y)
40 sleep 1
41 userdel -rf tester
42 if [ $? -eq 0 ] || [ $? -eq 6 ]
43 then
44 echo "Success to delete user tester"
45 else
46 echo "Fail to delete user tester"
47 fi
48 ;;
49no|n)
50 sleep 1
51 echo "There must be deleted User test before ran LSB4 on Target"
52 echo ""
53 exit 1
54 ;;
55*)
56 sleep 1
57 echo "Input ERROR, pls reinput that your expected"
58 echo ""
59 exit 1
60esac
61else
62 echo "There was not User tester"
63fi
64
65##Funs
66check ()
67{
68if [ $? -eq 0 ]
69then
70 echo "PASS"
71else
72 echo "FAIL"
73 exit 1
74fi
75}
76
77###Start
78#Step 1:Add tester group
79echo ""
80echo "---------------------------------"
81echo "Step 1:Add Group tester"
82groupadd tester
83check
84
85
86#Step 2:Add User tester
87echo ""
88echo "---------------------------------"
89echo "Step 2:Add User tester"
90useradd -g tester tester
91check
92
93echo "Check the tester user"
94id tester
95check
96
97#Step 3;Stop Boa server
98#echo ""
99#echo "---------------------------------"
100#echo "Step 3:Stop BOA server"
101#/etc/init.d/boa stop
102#check
103
104#Step 4:Create Dirnames file for RPM
105echo ""
106echo "---------------------------------"
107echo "Step 4:Create the Dirnames on target"
108
109mkdir -pv /etc/rpm/sysinfo
110
111cat > /etc/rpm/sysinfo/Dirnames << EOF
112/etc/opt/lsb
113/home/tet/LSB.tools
114/opt/lsb-tet3-lite/lib/ksh
115/opt/lsb-tet3-lite/lib/perl
116/opt/lsb-tet3-lite/lib/posix_sh
117/opt/lsb-tet3-lite/lib/tet3
118/opt/lsb-tet3-lite/lib/xpg3sh
119/opt/lsb/appbat/lib/python2.4/site-packages/qm
120/opt/lsb/appbat/lib/python2.4/site-packages/qm/external
121/opt/lsb/appbat/lib/python2.4/site-packages/qm/external/DocumentTemplate
122/opt/lsb/appbat/lib/python2.4/site-packages/qm/test
123/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/classes
124/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/web
125/opt/lsb/test/doc
126/opt/lsb/test/lib
127/opt/lsb/test/qm/diagnostics
128/opt/lsb/test/qm/doc
129/opt/lsb/test/qm/doc/test/html
130/opt/lsb/test/qm/doc/test/print
131/opt/lsb/test/qm/dtml
132/opt/lsb/test/qm/dtml/test
133/opt/lsb/test/qm/messages/test
134/opt/lsb/test/qm/tutorial/test/tdb
135/opt/lsb/test/qm/tutorial/test/tdb/QMTest
136/opt/lsb/test/qm/web
137/opt/lsb/test/qm/web/images
138/opt/lsb/test/qm/web/stylesheets
139/opt/lsb/test/qm/xml
140/opt/lsb/test/share
141/usr/share/doc/lsb-runtime-test
142/var/opt/lsb
143/opt/lsb/test/desktop
144/opt/lsb/test/desktop/fontconfig
145/opt/lsb/test/desktop/freetype
146/opt/lsb/test/desktop/gtkvts
147/opt/lsb/test/desktop/libpng
148/opt/lsb/test/desktop/qt3
149/opt/lsb/test/desktop/xft
150/opt/lsb/test/desktop/xml
151/opt/lsb/test/desktop/xrender
152
153
154EOF
155
156if [ -f /etc/rpm/sysinfo/Dirnames ]
157then
158 echo "Success to creat Dirnames file"
159else
160 echo "Fail to creat Dirnames file"
161fi
162
163#Step 5;
164echo ""
165echo "---------------------------------"
166echo "Step 5:"
167ldconfig -v
168check;
169
170#Step 6;
171echo ""
172echo "---------------------------------"
173echo "Step 6:Check with link to ftp.linux-foundation.org"
174echo "140.211.169.59 ftp.linux-foundation.org ftp.linuxfoundation.org" >> /etc/hosts
175
176ping -c 5 ftp.linux-foundation.org
177check
178
179#Step 7
180if [ -f /lib/modules/*-wr-standard/kernel/drivers/block/loop.ko ];then
181 inmod /lib/modules/*-wr-standard/kernel/drivers/block/loop.ko
182fi
183
184#Step 8
185echo ""
186if [ -f /opt/lsb/test/manager/bin/dist-checker-start.pl ];then
187 ./opt/lsb/test/manager/bin/dist-checker-start.pl
188fi
189
190
191#Step 9 get ip address for target platform
192addr=`ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}'|sed s/[[:space:]]Bcast//g`
193echo -e "you should input ${addr}:8888 on your browse"
194#Step 8
195echo "Done!!"
196
197###End