Siddesh BG's Build Release Config mgmt Blog

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, 27 July 2008

HP UX start/stop/restart sshd service

Posted on 23:00 by Unknown

To start/stop sshd service, you must use "root" account"

System startup configuration file

/etc/rc.config.d/sshd

Stop HP UX SSH Service

/sbin/init.d/secsh stop

Start HP UX SSH Service

/sbin/init.d/secsh start


If /sbin/init.d/secsh is not found, you can try the following if found

/sbin/init.d/S91sshd start
Read More
Posted in hpux | No comments

Thursday, 17 July 2008

Unix Operating System Name Abbreviations and Processor Architecture Abbreviations

Posted on 00:17 by Unknown
Operating System Name Abbreviations
Operating SystemName
AIXaix
Compaq Tru64 UNIX
Digital UNIX
OSF/1
tru64
FreeBSDfreebsd
HP-UXhpux
IRIXirix
Linuxlinux
MacOS Xmacosx
NetBSDnetbsd
OpenBSDopenbsd
Solarissolaris


Processor Architecture Abbreviations
Processor(s)Abbreviation
Compaq Alphaalpha
HP Precision Architecturehppa
INTEL 80x86intel
INTEL 80x86 w/64bit Extensionsx86_64
MIPS RISCmips
IBM Power PCpowerpc
SPARC
MicroSPARC
UltraSPARC
sparc




Read More
Posted in Miscellaneous | No comments

Wednesday, 16 July 2008

Software Packaging Formats

Posted on 02:02 by Unknown
Software Packaging Formats (Reference - s/w distribution using ESP)
In Unix there are many open source packaging systems, it is always better to have a list and to compare among them.
FormatOperating Systems1Binaries Cross- PlatformPatches Up- gradesCon- flictsRe- quires Re- placesConfig FilesMap FilesUn- install
installp AIXYes NoNo NoYes YesNo NoNo Yes
pkg_add FreeBSDYes Yes2NoNoNo No NoNo NoYes
pkg_add NetBSD
OpenBSD
Yes Yes2NoNoYes Yes NoNo NoYes
dpkg Corel Linux
Debian GNU/Linux
YesYes2 NoYes YesYes YesYes NoYes
depot HP-UXYes NoYes YesYes YesNo YesYes Yes
inst IRIXYes NoYes YesYes YesYes YesYes Yes
Install.app MacOS XYes NoNo YesNo NoNo NoNo No
pkgadd SolarisYes NoYes NoYes YesNo YesYes Yes
rpm Mandrake
Red Hat
SuSE
TurboLinux
YesYes2 NoYes YesYes NoYes NoYes
setld Tru64 UNIXYes NoNo NoYes YesNo NoNo Yes
slackware Slackware LinuxYesNoNo No YesYes NoNo NoYes
Read More
Posted in package | No comments

Friday, 11 July 2008

dpkg-deb (subprocess): control: internal gzip error: read(4096) != write(0): No space left on device

Posted on 03:43 by Unknown
set TMPDIR environment variable to a free disk space path
Read More
Posted in build-failures, hpux | No comments

Wednesday, 9 July 2008

How to install Perl modules

Posted on 23:10 by Unknown
For example to install Mail::Mailer module, you can use below
command

perl -MCPAN -e 'install Mail::Mailer'

Also refer http://www.cpan.org/modules/INSTALL.html for another
approach

Offline Installation of Perl module
perl Makefile.PL
make
make test
make install

How do I find out what modules are already installed on my system?

Each time a module is installed on your system, it appends information like the following to a file called perllocal.pod which can be found in /usr/local/lib/perl5/version number/architecture/ or something akin to that. The path for your specific installation is in your @INC which you can divine with perl -V.
=head2 Wed May 12 13:42:53 1999: C L
=over 4
=item *
C
=item *
C
=item *
C
=item *
C
=back

Each entry includes the Module name, date and time it was installed, where it was installed, linktype [ static or dynamic ], version and executables, if any, included with the module.

Another way to do this is http://vijayk.blogspot.com/2008/06/list-all-installed-perl-modules.html
Read More
Posted in Perl | No comments

Monday, 7 July 2008

Perforce commands FAQ

Posted on 04:48 by Unknown
1) How to delete a Perforce client?
p4 client -d

2) How to copy named template's view to current client?
p4 client -t

3) What is the use of P4CONFIG environment variable?
You can define Perforce environment variables in this configuration file. Place this file in your client root or even top-level directory. Perforce will fetch values from this configuration file.
For Ex: setenv P4CONFIG .p4config
cd $P4ROOT
vi .p4config
P4PORT=localhost:1666
P4CLIENT=client1

4) How to retrieve a file revision from Perforce depot?
p4 print -q //depot/source/proj1/test.c#5 > test.c

5) How to add the entire directory to Perforce?
find . -type f|p4 -x- add
find . -type l|p4 -x- add -t symlink

6) How to check who all working(opened) on a given file?
p4 opened -a

7) How to list opened files that are different than the revision in the depot or missing?
p4 diff -sa

8) Listing unopened files that are missing on the client
p4 diff -sd

9) Listing unopened files that are different from the revision in the depot
p4 diff -se

10) Listing opened files that are same as the revision in the depot
p4 diff -sr

11) How to revert all files opened for edit but have unchanged content?
p4 revert -a

12) Locking an opened file against submission
p4 lock file-name
To unlock
p4 unlock file-name

13) How to list the differences between the 2 branches?
p4 diff -q //depot/main/jam/... //depot/rel1/jam/...

14) Deleting and re-adding files
% p4 delete file.txt
//depot/src/file.txt#33 - opened for delete
% p4 submit
Delete //depot/src/file.txt#34
Change 145 submitted
% p4 sync file.txt#33
% p4 add file.txt
%p4 submit
Add //depot/src/file.txt#35
Change 146 submitted

Read More
Posted in Perforce | No comments

Tuesday, 1 July 2008

Automatic Variables in Makefiles

Posted on 01:36 by Unknown
Automatic variables in Makefiles (make/gmake)
$@: The filename representing the target
$%: The filename element of an archive member specification
$<: The filename of the first prerequisite
$?: The names of all prerequisite that are newer than the target, separated by spaces
$^: The filenames of all the prerequisite's, separated by spaces. (Without duplicates)
$+: Same as $^, except that it includes duplicates
$*: The stem of target filename. A stem is typically a filename without it's suffix.

User defined variables
*) A variable name can contain any characters including spaces except # and =.
*) Case sensitive
*) To get the value of a variable, enclose the variable name in $(). Single-letter variable can omit parenthesis
*) Variables can also be expanded using curly braces as in ${CC}
*) The value of a variable consists of all the words to the right of the assignment symbol with leading space trimmed. Trailing spaces are not trimmed
Read More
Posted in Makefile | No comments

Perl Hobby Scripts

Posted on 00:16 by Unknown

A. Simple

1. Write a Perl script to find and print the longest word in a text file.

2. Implement proactive password checker, means allow a person to enter his password, check for following conditions

- Password should be at least 8 characters in length

- It should contain alphanumeric, upper & lowercase letters

- It should contain any of these special characters @, $ and #.

Solutions


#!/usr/bin/perl -w

#Write a Perl script to find and print the longest word in a text file.

#Importing packages

use strict;

use Getopt::Long;

#Global variables

my ($help, $file);

#Processing command line arguments

GetOptions("h"=>\$help,

"f=s"=>\$file,

);

if($help) {

usage();

}

#Check for -f option

if(!defined($file)){

print "ERROR: -f option is compulsory\n";

usage();

}

open(FH, "$file") || die "Error: Can't open $file: $!";

my ($len,$word,@line,$element);

my $largest=0;

foreach()

{

@line=split(/\s+/,$_);

foreach $element (@line)

{

$len=length($element);

if($len > $largest) {

$largest=$len;

$word=$element;

}

}

}

print "Largest word length is: $largest and the word is $word\n";

sub usage

{

print "USAGE: $0 -f \n";

exit(1);

}

2.

#!/usr/bin/perl -w

## Proactive password checker ##########

use strict;

use Term::ReadKey;

my $user=`whoami`; chomp($user);

print "Hello $user ..\n";

my $try=0;

my $passwd;

accept_password();

sub accept_password

{

$try++;

if($try <= 3)

{

print "Enter your password\n";

ReadMode 'noecho';

$passwd=ReadLine 0;chomp($passwd);

ReadMode 'normal';

check_passwd();

}else

{

print "You exceeded maximum attempts\n";

exit(1);

}

}

sub check_passwd

{

#Check if password length is atleast 8

if(length($passwd) <>

{

print "ERROR: Your password length is less than 8\n";

print "PASSWORD REJECTED\n";

accept_password();

}

#Check for digit

if($passwd =~ /[0-9]/) {

}else{

print "ERROR: No digit in your password\n";

print "PASSWORD REJECTED\n";

accept_password();

}

#Check for lowercase letter

if($passwd =~ /[a-z]/) {

}else{

print "ERROR: No lowercase letter in your password\n";

print "PASSWORD REJECTED\n";

accept_password();

}

#Check for Uppercase letter

if($passwd =~ /[A-Z]/) {

}else{

print "ERROR: No Uppercase letter in your password\n";

print "PASSWORD REJECTED\n";

accept_password();

}

#Check for special characters

#if(($passwd =~ /\@/)|| ($passwd =~ /#/) || ($passwd =~ /\$/)){

if( ($passwd =~ /\@/) || ($passwd =~ /\$/) || ($passwd =~ /\#/) ){

}else{

print "ERROR: No special characters \@ # \$\n";

print "PASSWORD REJECTED\n";

accept_password();

}

}

print "PASSWORD ACCEPTED\n";

Read More
Posted in Perl | No comments
Newer Posts Older Posts Home
View mobile version
Subscribe to: Posts (Atom)

Popular Posts

  • Solution to Project Euler Problem 10 - Find the sum of all the primes below two million
    http://projecteuler.net/problem=10 Problem The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two mi...
  • Fortify scan automation steps for analyzing c/c++ code (Makefiles)
    I wrote in my previous blog about installing and configuring Fortify client. This blog presents standard steps to automate fortify scan for ...
  • Posting a JIRA bug using Perl Mechanize
    Perl provides modules which can be used as command line browser to automate tasks dependent on web pages. Among them LWP and mechanize are i...
  • jenkins error: java.io.IOException: Authentication method password not supported by the server at this stage
    When I tried to add a node to jenkins/hudson using ssh as launch method, the authentication keeps on failing with the below error. [12/15/11...
  • Unable to resolve target system name - a DNS problem
    I was not able to ping to any machines from my Windows 2003 server. I did following steps to debug & resolve the issue, which was relate...
  • Installing and configuring Fortify on Linux and Windows machines
    Installing Fortify on Linux (RHEL 5 32 bit) Download Fortify archive Fortify-360-2.6.5-Analyzers_and_Apps-Linux-x86.tar.gz and extract it to...
  • Perforce - can't edit exclusive file already opened
    In perforce, whenever a binary file like doc, xls or ppt files are checked out, it is opened in exclusive lock mode. So no other person can ...
  • Perforce and cygwin
    Are you a command-line freak ? Do you want your automated shell scripts to run on Windows ? Do you wish to work with Perforce commands on Cy...
  • Using BUILD_LOG_REGEX in jenkins email notification
    Jenkins provide 'Email-ext' plugin, which  allows to configure every aspect of email notifications. One of my requirement is to send...
  • 0509-036 Cannot load program p4 because of the following errors
    Here is the full description of error ............ bash-3.00# p4 info exec(): 0509-036 Cannot load program p4 because of the following error...

Categories

  • AIX
  • AIX ssh
  • ANT
  • apache
  • appliance
  • awk
  • branching
  • build-failures
  • cgi-perl
  • code-signing
  • commands
  • continuous Integration
  • cvs
  • cygwin
  • DNS
  • Drupal
  • EPM
  • euler
  • Fortify
  • hadoop
  • hpux
  • html
  • InstallShield
  • iptables
  • iso
  • jenkins-hudson
  • Jira
  • kiwi
  • linux
  • Makefile
  • maven
  • Miscellaneous
  • mysql
  • nexus
  • NFS
  • package
  • Perforce
  • Perl
  • php
  • rbuilder
  • rpath
  • rpm
  • rsync
  • Solaris
  • ssh
  • SuseStudio
  • tinderbox
  • unix
  • Visual studio 2008
  • vmware
  • war
  • webserver
  • wget
  • windows
  • xterm

Blog Archive

  • ►  2013 (12)
    • ►  December (1)
    • ►  July (2)
    • ►  April (2)
    • ►  March (2)
    • ►  February (3)
    • ►  January (2)
  • ►  2012 (43)
    • ►  December (2)
    • ►  November (1)
    • ►  October (4)
    • ►  September (7)
    • ►  August (5)
    • ►  July (4)
    • ►  June (2)
    • ►  May (3)
    • ►  April (4)
    • ►  March (3)
    • ►  February (1)
    • ►  January (7)
  • ►  2011 (23)
    • ►  December (4)
    • ►  November (9)
    • ►  October (4)
    • ►  September (1)
    • ►  June (2)
    • ►  May (1)
    • ►  April (1)
    • ►  March (1)
  • ►  2010 (15)
    • ►  December (2)
    • ►  November (1)
    • ►  September (3)
    • ►  April (1)
    • ►  February (6)
    • ►  January (2)
  • ►  2009 (28)
    • ►  November (5)
    • ►  October (3)
    • ►  September (2)
    • ►  August (1)
    • ►  July (1)
    • ►  June (5)
    • ►  May (3)
    • ►  April (1)
    • ►  February (2)
    • ►  January (5)
  • ▼  2008 (20)
    • ►  December (6)
    • ►  November (3)
    • ►  October (1)
    • ►  September (1)
    • ▼  July (8)
      • HP UX start/stop/restart sshd service
      • Unix Operating System Name Abbreviations and Proce...
      • Software Packaging Formats
      • dpkg-deb (subprocess): control: internal gzip erro...
      • How to install Perl modules
      • Perforce commands FAQ
      • Automatic Variables in Makefiles
      • Perl Hobby Scripts
    • ►  June (1)
Powered by Blogger.

About Me

Unknown
View my complete profile