LSB_Setup.sh: Add locale resources and startup avi
PATCH 1/2 init-functions: Add two functions
In reply to Xiaofeng YanFrom: Xiaofeng Yan <[email protected]>
Add log_begin_msg() and log_end_msg () in init-functions because some startup scripts need them. if there are not two functions, then error information will arise on screen.
for example,
$ /etc/init.d/avahi-daemon start /etc/init.d/avahi-daemon: line 161: log_begin_msg: command not found /etc/init.d/avahi-daemon: line 163: log_end_msg: command not found
[YOCTO #1907]
--- meta/recipes-extended/lsb/lsb/init-functions | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
meta/recipes-extended/lsb/lsb/init-functions +7 -0
@@ -30,3 +30,10 @@ log_warning_msg () { /etc/core-lsb/lsb_log_message warning "$@" } +log_begin_msg () { + /etc/core-lsb/lsb_log_message begin "$@" +} + +log_end_msg () { + /etc/core-lsb/lsb_log_message end "$@" +}
Signature · 1 line
1.7.0.4
PATCH 2/2 LSB_Setup.sh: Add locale resources and startup script avahi-daemon
In reply to Xiaofeng YanFrom: Xiaofeng Yan <[email protected]>
The purpose of adding locale resources is to resolve bug 1954 because missing locale resources cause many failures.
The purpose of adding startup script avahi-daemon is to resolve bug 1907. The detailed description is as follows:
No daemon progress "avahi-daemon" when system starting up.
Function "gethostbyaddr" will search file "/var/run/avahi-daemon/socket" but there is no this file which is created by avahi-daemon.
[YOCTO #1907 #1954]
--- meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh | 50 +++++++++++++--------- 1 files changed, 29 insertions(+), 21 deletions(-)
meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh +29 -21
@@ -16,7 +16,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##Prepare Steps -#Steps 0; Confirm the installed LSB Packages +# Confirm the installed LSB Packages ARCH=`uname -m` APP_FILE=`ls /lsb-Application/*.rpm` if [ ! -f /opt/lsb/test/manager/bin/dist-checker-start.pl ]
@@ -55,7 +55,7 @@ then fi fi -#Steps 1; Deleted existed user tester +# Deleted existed user tester id tester if [ $? -eq 0 ] then
@@ -85,7 +85,7 @@ fi } ###Start -#Step 1:Add tester group +# Add tester group echo "" echo "---------------------------------" echo "Step 1:Add Group tester"
@@ -93,7 +93,7 @@ groupadd tester check -#Step 2:Add User tester +# Add User tester echo "" echo "---------------------------------" echo "Step 2:Add User tester"
@@ -104,14 +104,14 @@ echo "Check the tester user" id tester check -#Step 3;Stop Boa server +# Stop Boa server #echo "" #echo "---------------------------------" #echo "Step 3:Stop BOA server" #/etc/init.d/boa stop #check -#Step 4:Create Dirnames file for RPM +# Create Dirnames file for RPM echo "" echo "---------------------------------" echo "Step 4:Create the Dirnames on target"
@@ -170,53 +170,61 @@ else echo "Fail to creat Dirnames file" fi -#Step 5; +# ldconfig echo "" echo "---------------------------------" echo "Step 5:" ldconfig -v check; -#Step 6; -echo "" -echo "---------------------------------" -echo "Step 6:Check with link to ftp.linux-foundation.org" -echo "140.211.169.59 ftp.linux-foundation.org ftp.linuxfoundation.org" >> /etc/hosts - -ping -c 5 ftp.linux-foundation.org -check -#Step 7 +# Insmod look.ko insmod /lib/modules/2.6.*/kernel/drivers/block/loop.ko if [ $? != 0 ];then echo "Please insmod loop.ko manully" fi -#Step 8 +# Start lsb echo "" if [ -f /opt/lsb/test/manager/bin/dist-checker-start.pl ];then /opt/lsb/test/manager/bin/dist-checker-start.pl fi -#Step 9 get ip address for target platform +# Get ip address for target platform addr=`ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}'|sed s/[[:space:]][[:space:]]Bcast//g` echo -e "you should input ${addr}:8888 on your browser" -#workaround to add part of locales for LSB test +# Workaround to add part of locales for LSB test localedef -i ja_JP -f EUC-JP ja_JP.eucjp localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15 +localedef -i en_US -f ISO-8859-1 en_US.ISO-8859-1 +localedef -i en_US -f ISO-8859-1 en_US +localedef -i de_DE -f UTF-8 de_DE.UTF-8 +localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro localedef -i en_US -f UTF-8 en_US.UTF-8 localedef -i se_NO -f UTF-8 se_NO.UTF-8 localedef -i de_DE -f ISO-8859-1 de_DE +localedef -i de_DE -f ISO-8859-15 de_DE.ISO-8859-15 localedef -i en_US -f ISO-8859-1 en_US.ISO8859-1 localedef -i fr_FR -f ISO-8859-1 fr_FR +localedef -i it_IT -f ISO-8859-1 it_IT +localedef -i es_MX -f ISO-8859-1 es_MX +localedef -i en_HK -f ISO-8859-1 en_HK +localedef -i en_PH -f ISO-8859-1 en_PH +localedef -i ta_IN -f UTF-8 ta_IN -#resolve localhost +# Resolve localhost LOCALHOST=`hostname` if ! `grep -F -q "$LOCALHOST" /etc/hosts`; then echo "127.0.0.1 $LOCALHOST" >> /etc/hosts fi -#Step 10 +# Start avahi-daemon +/etc/init.d/avahi-daemon start +ln -s /etc/init.d/avahi-daemon /etc/rc5.d/S88avahi-daemon + +# Done echo "Done!!" ###End + +
Signature · 1 line
1.7.0.4
cover LSB_Setup.sh: Add locale resources and startup avi
From: Xiaofeng Yan <[email protected]>
Add two parts:
1 Add absent locale resources in LSB_Setup.sh because of a lack of locale resources in core-image-lsb-qt3 when running lsb test. 2 Add avahi-daemon.
Function "gethostbyaddr" will search file "/var/run/avahi-daemon/socket" but there is no this file which is created by avahi-daemon.
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: xiaofeng/1907_1954
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=xiaofeng/1907_1954
Thanks,
Xiaofeng Yan <[email protected]>
---
Xiaofeng Yan (2):
init-functions: Add two functions
LSB_Setup.sh: Add locale resources and startup script avahi-daemon
meta/recipes-extended/lsb/lsb/init-functions | 7 +++ meta/recipes-extended/lsb/lsbsetup/LSB_Setup.sh | 50 +++++++++++++--------- 2 files changed, 36 insertions(+), 21 deletions(-)
Richard Purdie
AppliedQuoted 12 lines · Xiaofeng Yan
From: Xiaofeng Yan <[email protected]>
Add two parts:
1 Add absent locale resources in
LSB_Setup.shbecause of a lack of locale resources in core-image-lsb-qt3 when running lsb test. 2 Add avahi-daemon.
Function "gethostbyaddr" will search file "/var/run/avahi-daemon/socket" but there is no this file which is created by avahi-daemon.Pull URL:
git://git.pokylinux.org/poky-contrib.git
Branch: xiaofeng/1907_1954
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=xiaofeng/1907_1954
Quoted 8 lines
Thanks,
Xiaofeng Yan <[email protected]>
---Xiaofeng Yan (2):
init-functions: Add two functions
LSB_Setup.sh: Add locale resources and startup script avahi-daemon
Merged to master, thanks.
Richard