Popular Posts

Jun 25, 2019

Solaris - Script to label multiple disks

Solaris - Script to Label Multiple Disks

APPLIES TO :  Oracle SPARC Solaris

ISSUE : Assigning N number disks to a new server and labeling the disks one by one is a painful task to the Administrators 

GOAL :  Create a Script to Label the disks

SOLUTION :  Create a Script to Label the disks to make Admins Life easier.

Create three Files :   

               1. Create file named /root/format and update the below entries.
                          bash # vi /root/format
                                          label
                                          quit

               2. Create file named /root/new_disks and update list of disks to be labelled.
                          bash # vi /root/new_disks
                                          c0t0d0
                                          c0t1d0
                                          c1t0d0
                                          c1t1d0
                                          c2t0d0
                                          c2t1d0
                                          c3t0d0
                                          c3t1d0

               3. Create script named /root/label.sh and update the below script.
                         # bash # vi /root/label.sh
                                          #!/bin/ksh
                                          #label.sh - Script to label multiple disks in Solaris
                                          for i in `cat /root/new_disks` ;    do
                                                format -s -f /root/format $i                                          
                                                echo "Disk Label Done - $i "
                                          done

               4. Change the permission and execute the script.
                         # bash # chmod 755 /root/label.sh  
                         # bash # ./label.sh
                         Disk Label Done - c0t0d0
                         Disk Label Done - c0t1d0
                         Disk Label Done - c1t0d0
                         Disk Label Done - c1t1d0
                         Disk Label Done - c2t0d0
                         Disk Label Done - c2t1d0
                         Disk Label Done - c3t0d0
                         Disk Label Done - c3t1d0

~Judi~

Jun 5, 2019

Installing Additional Locales and Troubleshooting locale in Solaris 11

Installing Additional Locales and Troubleshooting locale in Solaris 11


About Internationalization and LocalizationInternationalization and localization are different procedures.

Internationalization is the process of making software portable between languages or regions, Internationalized software can be developed using interfaces that modify program behavior at runtime in accordance with specific cultural requirements.

while localization is the process of adapting software for specific languages or regions.Localization includes adding language specific data, and translating user interfaces to a specific language.Localization involves establishing online information to support a language or region also called a locale.


C Locale : The C locale, also known as the POSIX locale, is the default system locale for all POSIX-compliant systems. The Oracle Solaris operating system is a POSIX system. The Single UNIX Specification, Version 3, defines the C locale. You can register at http://www.unix.org/version3/online.html to read and download the specification.

Local Categories :
The following list describes the types of locale categories:

LC_CTYPE
Specifies character classification and case conversion.

LC_TIME
Specifies date and time formats, including month names, days of the week, and common full and abbreviated representations.

LC_MONETARY
Specifies monetary formats, including the currency symbol for the locale, thousands separator, sign position, the number of fractional digits, and so forth.

LC_NUMERIC
Specifies the decimal delimiter (or radix character), the thousands separator, and the grouping.

LC_COLLATE
Specifies a collation order and regular expression definition for the locale.

LC_MESSAGES
Specifies the language in which the localized messages are written, and affirmative and negative responses of the locale (yes and no strings and expressions).

LO_LTYPE

Specifies the layout engine that provides information about language rendering. Language rendering (or text rendering) depends on the shape and direction attributes of a script.

Core Locales:
Language
Core locale
Chinese - Simplified
zh_CN.UTF-8
Chinese - Traditional
zh_TW.UTF-8
English
en_US.UTF-8
French
fr_FR.UTF-8
German
de_DE.UTF-8
Italian
it_IT.UTF-8
Japanese
ja_JP.UTF-8
Korean
ko_KR.UTF-8
Portuguese - Brazilian
pt_BR.UTF-8
Spanish
es_ES.UTF-8

Time Formats:
International Time Formats

Locale
Description
Time Format
C
-
23:59:00
en_US.UTF-8
English, U.S.A.
11:59:00 PM
es_US.UTF-8
Spanish, U.S.A.
11:59:00 p.m.
mr_IN.UTF-8
Marathi, India
11-59-00 pm
sq_AL.ISO8859-2
Albanian, Albania
11.59.00.MD
ja_JP.UTF-8
Japanese, Japan
23時59分00秒
ko_KR.UTF-8
Korean, Korea
오후11시 59분 00초
zh_CN.UTF-8
Simplified Chinese, China
23时59分00秒

Date Formats:
International Date Formats

Locale
Description
Date Format
C
-
07/16/11
en_CA.UTF-8
English, Canada
7/11/16
en_GB.UTF-8
English, United Kingdom
7/16/11
fi_FI.UTF-8
Finnish, Finland
7/16/11
ja_JP.UTF-8
Japanese, Japan
2011年07月16日
ko_KR.UTF-8
Korean, Korea
11. 07. 16.
zh_TW.UTF-8
Traditional Chinese, Taiwan
11年07月16日

Money Formats:
 International Monetary Conventions

Locale
Currency
Example
C
-
1234.56
da_DK.UTF-8
Danish krone (kr)
1.234,56kr
da_DK.ISO8859-15@euro
Euro (€)
1.234,56€
en_GB.UTF-8
Pound (£)
£1,234.56
en_US.UTF-8
United States dollar ($)
$1,234.56
fr_FR.UTF-8
Euro (€)
1 234,56€
ja_JP.UTF-8
Japanese yen (¥)
¥1,235
th_TH.UTF-8
Thai Baht (BHT)
THB1,234.56
zh_CN.UTF-8
Chinese yuan (¥)
¥1,234.56

judi-dev-01 # 
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LC_ALL = "",
        LC_MONETARY = "en_GB.ISO8859-15",
        LC_COLLATE = "en_GB.ISO8859-15",
        LC_CTYPE = "en_GB.ISO8859-15",
        LC_NUMERIC = "en_GB.ISO8859-15",
        LC_MESSAGES = "C",
        LC_TIME = "en_GB.ISO8859-15",
        LANG = "en_US.ISO8859-1"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.ISO8859-1").
judi-dev-01 #

Example-1 of installing en_GB locale using a combination of nlsadm and 'pkg install':

               judi-dev-01 # pkg change-facet facet.locale.en_GB=True
               --output omitted--

               judi-dev-01 # locale -a | egrep en_GB
               en_GB.ISO8859-1
               en_GB.ISO8859-15
               en_GB.ISO8859-15@euro

               en_GB.UTF-8
               judi-dev-01 #

Example-2 of installing en_GB locale using a combination of nlsadm and 'pkg install':
               judi-dev-01 #locale -a | egrep en_GB
               judi-dev-01 #
               judi-dev-01 #nlsadm list-locale -a | grep en_GB
                              Reading package information from IPS publisher's repository (it could take couple of minutes) ...
               en_GB.ISO8859-15       en    GB         ISO8859-15  -         -      
               en_GB.ISO8859-15@euro  en    GB         ISO8859-15  euro      -      
               en_GB.ISO8859-1        en    GB         ISO8859-1   -         -      
               en_GB.UTF-8            en    GB         UTF-8       -         -      
               judi-dev-01 #

               judi-dev-01 # nlsadm list-locale -a | egrep en_GB
                              Reading package information from IPS publisher's repository (this may take awhile) ...
               en_GB.ISO8859-1        en    GB         ISO8859-1   -         il
               en_GB.ISO8859-15       en    GB         ISO8859-15  -         ilc
               en_GB.ISO8859-15@euro  en    GB         ISO8859-15  euro      ils
               en_GB.UTF-8            en    GB         UTF-8       -         i

               judi-dev-01 #

               judi-dev-01 # nlsadm get-system-locale
               LANG=en_GB.ISO8859-15@euro
               LC_CTYPE=
               LC_NUMERIC=
               LC_TIME=
               LC_COLLATE=
               LC_MONETARY=
               LC_MESSAGES=
               LC_ALL=

               judi-dev-01 #

               judi-dev-01 # svccfg -s svc:/system/environment:init listprop environment/LANG
               judi-dev-01 # pkg change-facet facet.locale.en_GB=True
               judi-dev-01 # svccfg -s svc:/system/environment:init setprop environment/LANG = astring: en_GB.ISO8859-15@euro

               judi-dev-01 # svccfg -s svc:/system/environment:init listprop environment/LANG

~Judi~

Popular Posts