N900 and skype support
I was trying to add my skype account on the N900 today and could not add the account. I did not find any option to add the same. After some googling and searching, I found that I need to re-flash my N900.
Continue readingI was trying to add my skype account on the N900 today and could not add the account. I did not find any option to add the same. After some googling and searching, I found that I need to re-flash my N900.
Continue readingFor this time, I will just give you a link to to bashrc file.
http://hayne.net/MacDev/Bash/aliases.bash
Head over there and see some very interesting aliaseβs.
Here is the script, very simple and effective π
#!/bin/bash -
#===============================================================================
#
# FILE: mkchroot.sh
#
# USAGE: ./mkchroot.sh
#
# DESCRIPTION: Make a chroot environ and cd to it
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Amit Agarwal (aka),
# CREATED: 09/03/2011 02:53:37 PM IST
# Last modified: Sat Sep 03, 2011 03:11PM
# REVISION: ---
#===============================================================================
binaries=( bash2 ls cat vi vim sudo)
#=== FUNCTION ================================================================
# NAME: copy_binary
# DESCRIPTION: copy binary to chroot
# PARAMETERS:
# RETURNS:
#===============================================================================
copy_binary ()
{
cmd=`which $1`
echo $cmd
cp $cmd bin/
ldd $cmd
while read line
do
while read ld
do
if [[ -f $ld ]]
then
echo copy $ld
cp $ld lib/
if [[ -L $ld ]]
then
ld1=$( ls -l $ld |sed 's/.*> //')
echo " copy $ld1"
cp /lib/$ld1 lib/
fi
fi
done < <(echo $line|sed 's/.*> //'|sed 's/ .*//')
done < <(ldd $cmd)
} # ---------- end of function copy_binary ----------
#=== FUNCTION ================================================================
# NAME: init
# DESCRIPTION: Do the required initialization
# PARAMETERS:
# RETURNS:
#===============================================================================
init()
{
mkdir -p {root,home,dev,etc,lib,usr,bin}
mkdir -p usr/bin
mkdir -p libexec/openssh
mknod -m 666 dev/null c 1 3
cd etc
cp /etc/ld.so.cache .
cp -avr /etc/ld.so.cache.d/ .
cp -avr /etc/ld.so.conf.d/ .
cp /etc/ld.so.conf .
cp /etc/nsswitch.conf .
cp /etc/passwd .
cp /etc/group .
cp /etc/hosts .
cp /etc/resolv.conf .
cd -
}
cd $1
if [[ -f .status ]]
then
cat .status
echo "Not running now"
else
init
for i in ${binaries[*]}
do
copy_binary $i
cp -avr /etc/${i}* etc/
done
ln bin/bash2 bin/bash
echo "complete" > .status
fi
cp -avr ~/bin/automation root/automation
sudo chroot .
.
Continue reading[ad#ad-2]
I am testing some of my scripts to work on a very old system and there the versions of the most popular applications are very old, real old :(. So, some of things that I am very used to since last couple of years, do not seem to work as expected and I need to keep verifying a lot of things on the server, very inconvinient to keep testing the script on the server (need to connect on VPN) just to test some very simple things.
Continue readingI was trying to debug some bash scripts yesterday and learnt something new π
There are lot of things in bash that you can use to debug and to start with you can enable xtrace mode as follows:
set -x
With this set you will see that all the commands are printed along with all other information as they are executed.
This you can do for any line or for the function or for the whole script. Once you set the option you can turn it
off with
I was trying to install the duplicate Bookmark remover for the Firefox but for some reasons, was not able to install it. That apart, the point is that I was trying to get a program to do this for me rather than a plugin. So, after some search, finally I found here. This is a ruby script. The script requires ruby gems-json for doing this.
Continue readingSometimes, you find some interesting application/command by accident, and that is just what happened a few days back. Well, I was doing a ssh and as usual made my share of mistake in typing and missed the βhβ from the ssh command and saw a list of options instead of my prompt on remote server.
Now, that set me thinking and fond that its a very interesting command that comes with iproute on Fedoara, so if you want this command, then install iproute like this
Continue reading