#!/bin/bash
if [ ! -n "$2" ]; then
echo $0: machine_name MACid
exit 1
fi
hdiutil create -size 80G -type SPARSEBUNDLE \
-imagekey sparse-band-size=65536 \
-fs HFS+J \
-volname "Backup $1" \
~/Documents/"$1_$2".sparsebundle
Above is to create a sparsebundle file required for Time Machine backup to remote afp
Tuesday, October 07, 2008
Monday, October 06, 2008
autofs mount of nfs and afp with stardom NAS and Synology NAS
Stardom come with nfs
Synology come with afp
Use below to automount afp
1) add below to /etc/auto_master
/afp auto_afp
2) add below to auto_afp
mountpoint -fstype=afp afp://username:password@synology_ip_address/afp_share
3) use below to refresh autofs
automount -vc
Use below to automount nfs
1) add below to /etc/fstab
stardom_ip_address:/mnt/ide1/nfs_share /opt/nfs_share nfs resvport rw 0 0
2) use below to refresh autofs
automount -vc
Synology come with afp
Use below to automount afp
1) add below to /etc/auto_master
/afp auto_afp
2) add below to auto_afp
mountpoint -fstype=afp afp://username:password@synology_ip_address/afp_share
3) use below to refresh autofs
automount -vc
Use below to automount nfs
1) add below to /etc/fstab
stardom_ip_address:/mnt/ide1/nfs_share /opt/nfs_share nfs resvport rw 0 0
2) use below to refresh autofs
automount -vc
Wednesday, October 01, 2008
madplay
diff -up ./audio_carbon.c.lama ./audio_carbon.c
--- ./audio_carbon.c.lama 2004-01-23 17:41:31.000000000 +0800
+++ ./audio_carbon.c 2008-10-01 20:22:00.000000000 +0800
@@ -94,7 +94,7 @@ void callback(SndChannelPtr channel, Snd
}
static
-int wait(struct buffer *buffer)
+int delay(struct buffer *buffer)
{
if (MPWaitOnSemaphore(buffer->semaphore, kDurationForever) != noErr) {
audio_error = _("MPWaitOnSemaphore() failed");
@@ -263,7 +263,7 @@ int play(struct audio_play *play)
/* wait for block to finish playing */
if (buffer->pcm_nsamples == 0) {
- if (wait(buffer) == -1)
+ if (delay(buffer) == -1)
return -1;
buffer->pcm_length = 0;
#!/bin/bash
export CFLAGS="\
-I/Users/Shared/gnu/libid3tag-0.15.1b/include \
-I/Users/Shared/gnu/libmad-0.15.1b/include \
-msse \
"
export CPPFLAGS="\
-I/Users/Shared/gnu/libid3tag-0.15.1b/include \
-I/Users/Shared/gnu/libmad-0.15.1b/include \
"
export LDFLAGS="\
-L/Users/Shared/gnu/libid3tag-0.15.1b/lib \
-L/Users/Shared/gnu/libmad-0.15.1b/lib \
"
./configure \
--prefix=/Users/Shared/gnu/madplay-0.15.2b \
Subscribe to:
Posts (Atom)