Archive

Archive for April, 2009

Leopard keeps warning : is an application which was downloaded from the internet. Are you sure you want to open it?

April 27th, 2009 No comments

Full thread I found is here , below is the short version on how to remove the extended attributes and possible ACL’s. Leopard adds an ACL called com.apple.quarantine to your download apps :

1. Open the Terminal
2. List the attributes of the app you are having issue with ( in this example , skype )

mac: moti$ xattr -l /Applications/Skype.app
com.apple.quarantine: 0000;49d521d9;Firefox;|org.mozilla.firefox

Remove the “com.apple.quatantine” attribute if it is defined

sudo xattr -d com.apple.quarantine /Applications/Skype.app

3. Check the attributes again

mac: moti$ xattr -l /Applications/Skype.app
mac: moti$

com.apple.quarantine should not be listed.

FreeBSD – reload nginx configuration

April 23rd, 2009 No comments

test the config !!!

sudo nginx -t

output :

2009/04/23 09:11:46 [info] 46329#0: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
2009/04/23 09:11:46 [info] 46329#0: the configuration file /usr/local/etc/nginx/nginx.conf was tested successfully

then reload :

sudo kill -HUP `cat /var/run/nginx.pid`

DRBD , Centos and unmount nfs resources

April 20th, 2009 1 comment

I have recently built a DRBD + Linux HA NFS cluster , part of the structure was to create a drbd disk resource and mount it on /var/lib/nfs. This allows to switch nfs over to the secondary node without getting “stale nfs handle” errors. Heartbeat was having a hardtime doing a clean umount of the file system and ended up rebooting the machine.

Apr 20 06:47:07 fs Filesystem[9823]: [9887]: INFO: No processes on /var/lib/nfs were signalled
Apr 20 06:47:08 fs Filesystem[9823]: [9890]: ERROR: Couldn’t unmount /var/lib/nfs; trying cleanup with SIGKILL

After some poking around the systems It looked like nfs was not showtdown cleanly. looking into the rc script i changed the signal from 2 to 9

From :

stop)
# Stop daemons.
echo -n $”Shutting down NFS mountd: ”
killproc rpc.mountd
echo
echo -n $”Shutting down NFS daemon: ”
killproc nfsd -2
echo

To :

stop)
# Stop daemons.
echo -n $”Shutting down NFS mountd: ”
killproc rpc.mountd
echo
echo -n $”Shutting down NFS daemon: ”
killproc nfsd -9
echo

and now, all is well :)

Apr 20 06:52:49 fs Filesystem[8696]: [8754]: INFO: unmounted /var/lib/nfs successfully

searching the web shows this is a somewhat known issue

Change VMware fusion network settings

April 3rd, 2009 No comments

After a long day restoring my mac from backups I finally started up my virtual machines only to find out my network settings are configured wrong , I use static ip’s on my vm’s so the easy way was to just get my old settings back , here’s how:

Stop all your vm’s , exit fusion and follow the process

1. remove current settings :

cd /Library/Application\ Support/VMware\ Fusion/
sudo rm locations

2. rebuild config ( script does not need your answers ) :

sudo ./vmware-config-net.pl
sudo ./boot.sh –restart

3. change your ip in the locations file :

sudo vi locations
change this line ( for hostonly address )
answer VNET_8_HOSTONLY_HOSTADDR 192.168.119.1

4. apply settings

sudo ./vmware-config-net.pl
sudo ./boot.sh –restart

5. verify

ifconfig -a