]> git.parisson.com Git - telecaster-cloning.git/commitdiff
fix local disk to sdb master
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 16 Oct 2012 09:18:17 +0000 (11:18 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 16 Oct 2012 09:18:17 +0000 (11:18 +0200)
bin/tc_clone_pxe_local.sh

index cc3af467538c3d30a837cd5dfcda430847564db5..0b72b875bfa9b32f5fb7fbdaa82a3bbc70989b54 100755 (executable)
@@ -2,7 +2,6 @@
 
 set -e
 
 
 set -e
 
-MASTER=127.0.0.1
 MASTERPATH=/mnt/custom
 NAME=$1
 CLONE=/mnt/$NAME
 MASTERPATH=/mnt/custom
 NAME=$1
 CLONE=/mnt/$NAME
@@ -21,16 +20,16 @@ fi
 
 mount /dev/$ROOT_PART $CLONE
 echo "rsyncing root..."
 
 mount /dev/$ROOT_PART $CLONE
 echo "rsyncing root..."
-rsync -a --delete --one-file-system $MASTER:$MASTERPATH/ $CLONE/
+rsync -a --delete --one-file-system $MASTERPATH/ $CLONE/
 
 echo "rsyncing home..."
 mount /dev/$HOME_PART $CLONE/home
 
 echo "rsyncing home..."
 mount /dev/$HOME_PART $CLONE/home
-rsync -a --delete --one-file-system --exclude=telecaster/archives/ --exclude=telecaster/trash/ --exclude=telecaster/test/ $MASTER:$MASTERPATH/home/ $CLONE/home/
+rsync -a --delete --one-file-system --exclude=telecaster/archives/ --exclude=telecaster/trash/ --exclude=telecaster/test/ $MASTERPATH/home/ $CLONE/home/
 umount $CLONE/home
 
 echo "rsyncing var..."
 mount /dev/$VAR_PART $CLONE/var
 umount $CLONE/home
 
 echo "rsyncing var..."
 mount /dev/$VAR_PART $CLONE/var
-rsync -a --delete --one-file-system $MASTER:$MASTERPATH/var/ $CLONE/var/
+rsync -a --delete --one-file-system $MASTERPATH/var/ $CLONE/var/
 
 
 # CHROOT
 
 
 # CHROOT
@@ -59,7 +58,7 @@ echo "UUID=$uuid    none    swap    sw    0       0" >> $CLONE/etc/fstab
 
 echo $NAME > $CLONE/etc/hostname
 
 
 echo $NAME > $CLONE/etc/hostname
 
-chroot $CLONE grub-install /dev/sda
+chroot $CLONE grub-install /dev/sdb
 chroot $CLONE update-grub
 
 umount $CLONE/sys
 chroot $CLONE update-grub
 
 umount $CLONE/sys