mirror of
https://github.com/FOGProject/fos.git
synced 2026-05-04 22:46:01 -05:00
Create basic fos.capture
This commit is contained in:
20
Buildroot/board/FOG/FOS/rootfs_overlay/bin/fos.capture
Executable file
20
Buildroot/board/FOG/FOS/rootfs_overlay/bin/fos.capture
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
########################################
|
||||
# Read the image from the device. #
|
||||
# Arguments: #
|
||||
# $1 The target to capture #
|
||||
# $2 The type of partclone capture #
|
||||
########################################
|
||||
target="$1"
|
||||
fstype="$2"
|
||||
if [[ -z $target ]] ; then
|
||||
(>&2 echo "No target passed\n Usage: $0 /dev/sda1 ntfs")
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z $fstype ]] ; then
|
||||
(>&2 echo "No fstype passed\n Usage: $0 /dev/sda1 ntfs")
|
||||
exit 2
|
||||
fi
|
||||
mkfifo /tmp/data1
|
||||
partclone.$fstype -fsck-src-part -c -s $target -O /tmp/data1 &
|
||||
>&1 cat /tmp/data1
|
||||
Reference in New Issue
Block a user