aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-08-16 20:07:40 +0300
committerFilipp Lepalaan <filipp@mac.com>2010-08-16 20:07:40 +0300
commit999290053325e064d88760f5c52c98043d62d52c (patch)
treed0d39fc26b104828a4282c9fa1784a7119f6d82d
parent105a08740f6b9184f5344e68f680624b815ab27c (diff)
downloadmtk-999290053325e064d88760f5c52c98043d62d52c.tar.gz
mtk-999290053325e064d88760f5c52c98043d62d52c.tar.bz2
mtk-999290053325e064d88760f5c52c98043d62d52c.zip
added cyclone
-rw-r--r--LICENSE22
-rwxr-xr-xbloop.command2
-rwxr-xr-xbuild_rsync.sh2
-rwxr-xr-xcyclone.sh42
-rwxr-xr-xhellyes.command1
-rwxr-xr-xmake_boot/makeboot.sh3
-rwxr-xr-xmob2loc.sh1
-rwxr-xr-xpoweron.command2
-rw-r--r--serverbackup.sh2
-rw-r--r--useradd.sh2
10 files changed, 56 insertions, 23 deletions
diff --git a/LICENSE b/LICENSE
index 2705b08..059abc7 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,21 +1 @@
-The MIT License
-
-Copyright (c) 2010 Filipp Lepalaan
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+This work is in the Public Domain. To view a copy of the public domain certification, visit http://creativecommons.org/licenses/publicdomain/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
diff --git a/bloop.command b/bloop.command
index 45e643e..e21c7eb 100755
--- a/bloop.command
+++ b/bloop.command
@@ -3,7 +3,7 @@
# Launch applications and reboot the machine
# @author Filipp Lepalaan <filipp@mcare.fi>
# @author Vesa Viskari <vesa@mcare.fi>
-# @copyright (c) 2010 Filipp Lepalaan
+# @copyright No (c), Public Domain software
MYDIR="~/Desktop/BlooperApps"
diff --git a/build_rsync.sh b/build_rsync.sh
index 249f282..6fd7834 100755
--- a/build_rsync.sh
+++ b/build_rsync.sh
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
# build_rsync.sh
# @author Filipp Lepalaan <filipp@mcare.fi>
+# @copyright No (c), Public Domain software
# Build the most recent version of rsync
# with necessary patches.
# All thanks to Mike Bombich
@@ -41,6 +42,7 @@ cd rsync-${RSYNC_VERSION}
echo "Building rsync..."
patch -p1 <patches/fileflags.diff
patch -p1 <patches/crtimes.diff
+export CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386 -arch ppc" LDFLAGS="-arch i386 -arch ppc" MACOSX_DEPLOYMENT_TARGET=10.5
./prepare-source
./configure
make
diff --git a/cyclone.sh b/cyclone.sh
new file mode 100755
index 0000000..f77225a
--- /dev/null
+++ b/cyclone.sh
@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+# clone all partitions of a drive
+# and try not to waste space
+# @author Filipp Lepalaan <filipp@mcare.fi>
+
+if [[ $USER != "root" ]]; then
+ echo "Insufficient privileges!" 2>&1
+ exit 1
+fi
+
+if [[ $# -lt 2 ]]; then
+ echo "Usage: $(basename $0) source destination" 2>&1
+ exit 1
+fi
+
+SOURCE=$1
+TARGET=$2
+
+TMPFILE="/tmp/$(uuidgen)"
+
+# Get size of source
+diskutil info -plist $SOURCE > "${TMPFILE}".plist
+SOURCE_SIZE=`defaults read $TMPFILE TotalSize`
+
+# Get size of destination
+diskutil info -plist $TARGET > $TMPFILE
+TARGET_SIZE=`defaults read $TMPFILE TotalSize`
+rm $TMPFILE
+
+if [[ $TARGET_SIZE < $SOURCE_SIZE ]]; then
+ echo "Warning: target drive is smaller than source!" 2>&1
+fi
+
+if [[ $TARGET_SIZE == $SOURCE_SIZE ]]; then
+ echo "Drives are identical, cloning with dd..."
+ diskutil quiet unmountDisk $SOURCE
+ diskutil quiet unmountDisk $TARGET
+ dd bs=16m if="/dev/r${SOURCE}" of="/dev/r${TARGET}" conv=noerror,sync
+ diskutil quiet mountDisk $SOURCE
+ diskutil quiet mountDisk $TARGET
+ exit 0
+fi
diff --git a/hellyes.command b/hellyes.command
index cd857a0..bb4076b 100755
--- a/hellyes.command
+++ b/hellyes.command
@@ -2,6 +2,7 @@
# hellyeah.command
# Do some stress testing
# @author Filipp Lepalaan <filipp@mcare.fi>
+# @copyright No (c), Public Domain software
MYDIR=/private/tmp/_hellyeah
CORES=$(sysctl hw.logicalcpu_max | cut -d : -f 2 | sed 's/ //')
diff --git a/make_boot/makeboot.sh b/make_boot/makeboot.sh
index 135d978..e65decd 100755
--- a/make_boot/makeboot.sh
+++ b/make_boot/makeboot.sh
@@ -3,6 +3,9 @@
# Create NetBoot Image from any OS X volume
# Much of this is borrowed from DeployStudio/sys_builder.sh
# usage makeboot..sh source destination
+# http://pastebin.com/aJi3AxTe
+# https://www.wiki.ed.ac.uk/display/DSwiki/Automating+the+creation+of+NetBoot+images
+# http://clc.its.psu.edu/Labs/Mac/Resources/blastimageconfig/default.aspx
if [ $USER != "root" ]; then
echo "This must be run as root"
diff --git a/mob2loc.sh b/mob2loc.sh
index ad4c83c..a3f6b11 100755
--- a/mob2loc.sh
+++ b/mob2loc.sh
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
# Convert Mobile account to Local
# @author Filipp Lepalaan <filipp@mcare.fi>
+# @copyright No (c), Public Domain software
if [[ $USER != "root" ]]; then
echo "This tool must be run as root" >&2
diff --git a/poweron.command b/poweron.command
index 3e04120..67324ea 100755
--- a/poweron.command
+++ b/poweron.command
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
+# @author Filipp Lepalaan <filipp@mac.com>
+# @copyright No (c), Public Domain software
ON_DELAY=20
OFF_DELAY=120 # this should always be > 60
diff --git a/serverbackup.sh b/serverbackup.sh
index 68438e4..afa831c 100644
--- a/serverbackup.sh
+++ b/serverbackup.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
# serverbackup.sh
+# @author Filipp Lepalaan <filipp@mac.com>
+# @copyright No (c), Public Domain software
ODPASS=somepass # Password used to encrypt the OD archive
CALDATA=/Library/CalendarServer/Documents
diff --git a/useradd.sh b/useradd.sh
index 9ad307f..1efd9d4 100644
--- a/useradd.sh
+++ b/useradd.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# useradd.sh v1.2
-# (cc) 2006 Filipp Lepalaan <filipp@mac.com>
+# @copyright No (c), Public Domain software
# Updated to support both Tiger & Leopard <filipp@mac.com>
# Updated for Leopard by Allan Sanderson <allanbee@mac.com>
# Included non-interactive password setting - this is a contencious issue for