diff options
author | Saul Wold <sgw@linux.intel.com> | 2010-12-13 00:47:29 -0800 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2010-12-14 08:53:19 -0800 |
commit | 526da3b499d3259c9ded58f7dc9dd20af2985a9c (patch) | |
tree | a3034a267c91afde8c7773c926d48fabe203799e /meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh | |
parent | b3b25c84e9e6551d6fa0b01111fc1464ca945886 (diff) | |
download | poky-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.sh | 197 |
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 | |||
21 | if [ ! -f /opt/lsb/test/manager/bin/dist-checker-start.pl ] | ||
22 | then | ||
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 | ||
29 | fi | ||
30 | |||
31 | #Steps 1; Deleted existed user tester | ||
32 | id tester | ||
33 | if [ $? -eq 0 ] | ||
34 | then | ||
35 | echo "User tester was existed" | ||
36 | echo -n "Deleted tester(yes/no):" | ||
37 | read INPUT | ||
38 | case $INPUT in | ||
39 | yes|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 | ;; | ||
49 | no|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 | ||
60 | esac | ||
61 | else | ||
62 | echo "There was not User tester" | ||
63 | fi | ||
64 | |||
65 | ##Funs | ||
66 | check () | ||
67 | { | ||
68 | if [ $? -eq 0 ] | ||
69 | then | ||
70 | echo "PASS" | ||
71 | else | ||
72 | echo "FAIL" | ||
73 | exit 1 | ||
74 | fi | ||
75 | } | ||
76 | |||
77 | ###Start | ||
78 | #Step 1:Add tester group | ||
79 | echo "" | ||
80 | echo "---------------------------------" | ||
81 | echo "Step 1:Add Group tester" | ||
82 | groupadd tester | ||
83 | check | ||
84 | |||
85 | |||
86 | #Step 2:Add User tester | ||
87 | echo "" | ||
88 | echo "---------------------------------" | ||
89 | echo "Step 2:Add User tester" | ||
90 | useradd -g tester tester | ||
91 | check | ||
92 | |||
93 | echo "Check the tester user" | ||
94 | id tester | ||
95 | check | ||
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 | ||
105 | echo "" | ||
106 | echo "---------------------------------" | ||
107 | echo "Step 4:Create the Dirnames on target" | ||
108 | |||
109 | mkdir -pv /etc/rpm/sysinfo | ||
110 | |||
111 | cat > /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 | |||
154 | EOF | ||
155 | |||
156 | if [ -f /etc/rpm/sysinfo/Dirnames ] | ||
157 | then | ||
158 | echo "Success to creat Dirnames file" | ||
159 | else | ||
160 | echo "Fail to creat Dirnames file" | ||
161 | fi | ||
162 | |||
163 | #Step 5; | ||
164 | echo "" | ||
165 | echo "---------------------------------" | ||
166 | echo "Step 5:" | ||
167 | ldconfig -v | ||
168 | check; | ||
169 | |||
170 | #Step 6; | ||
171 | echo "" | ||
172 | echo "---------------------------------" | ||
173 | echo "Step 6:Check with link to ftp.linux-foundation.org" | ||
174 | echo "140.211.169.59 ftp.linux-foundation.org ftp.linuxfoundation.org" >> /etc/hosts | ||
175 | |||
176 | ping -c 5 ftp.linux-foundation.org | ||
177 | check | ||
178 | |||
179 | #Step 7 | ||
180 | if [ -f /lib/modules/*-wr-standard/kernel/drivers/block/loop.ko ];then | ||
181 | inmod /lib/modules/*-wr-standard/kernel/drivers/block/loop.ko | ||
182 | fi | ||
183 | |||
184 | #Step 8 | ||
185 | echo "" | ||
186 | if [ -f /opt/lsb/test/manager/bin/dist-checker-start.pl ];then | ||
187 | ./opt/lsb/test/manager/bin/dist-checker-start.pl | ||
188 | fi | ||
189 | |||
190 | |||
191 | #Step 9 get ip address for target platform | ||
192 | addr=`ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}'|sed s/[[:space:]]Bcast//g` | ||
193 | echo -e "you should input ${addr}:8888 on your browse" | ||
194 | #Step 8 | ||
195 | echo "Done!!" | ||
196 | |||
197 | ###End | ||