summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 14:46:37 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:25:54 +0100
commit3d52fbcb4fe70132ade14759d76573b471294800 (patch)
tree7ee8e69a62e032cb427e6b3ae96481ae4e8c9df8 /bin
parent9fc9e2a1a11b0edada38cb501fefe4f58aa414ac (diff)
downloadlive-boot-3d52fbcb4fe70132ade14759d76573b471294800.tar.gz
live-boot-3d52fbcb4fe70132ade14759d76573b471294800.zip
Adding live-initramfs 1.87.3-1.
Diffstat (limited to 'bin')
-rw-r--r--bin/live-md5check/live-md5check.c34
-rw-r--r--bin/live-md5check/md5.h2
-rwxr-xr-xbin/live-snapshot16
3 files changed, 26 insertions, 26 deletions
diff --git a/bin/live-md5check/live-md5check.c b/bin/live-md5check/live-md5check.c
index 8dfd577..8bac6a0 100644
--- a/bin/live-md5check/live-md5check.c
+++ b/bin/live-md5check/live-md5check.c
@@ -6,12 +6,12 @@
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
-
+
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
@@ -128,7 +128,7 @@ void usplash_success(int fd, char *format, ...) {
asprintf(&s1, "SUCCESS %s", s);
write_and_retry(fd, s1);
-
+
free(s);
free(s1);
}
@@ -161,10 +161,10 @@ int set_nocanonical_tty(int fd) {
}
int main(int argc, char **argv) {
-
+
int pipe_fd, check_fd;
int failed = 0;
-
+
FILE *md5_file;
md5_state_t state;
md5_byte_t digest[16];
@@ -180,20 +180,20 @@ int main(int argc, char **argv) {
fprintf(stderr,"%s <root directory> <md5sum file>\n", argv[0]);
exit(1);
}
-
+
if (chdir(argv[1]) != 0) {
perror("chdir");
exit(1);
}
-
+
pipe_fd = open(USPLASH_FIFO, O_WRONLY|O_NONBLOCK);
-
+
if (pipe_fd == -1) {
/* We can't really do anything useful here */
perror("Opening pipe");
exit(1);
}
-
+
usplash_progress(pipe_fd, 0);
usplash_urgent(pipe_fd, "Checking integrity, this may take some time");
@@ -218,18 +218,18 @@ int main(int argc, char **argv) {
char buf[BUFSIZ];
ssize_t rsize;
int i;
-
+
md5_init(&state);
-
+
usplash_text(pipe_fd, "Checking %s", checkfile);
-
+
check_fd = open(checkfile, O_RDONLY);
if (check_fd < 0) {
usplash_timeout(pipe_fd, 300);
usplash_failure(pipe_fd, "%s", strerror(errno));
sleep(10);
}
-
+
rsize = read(check_fd, buf, sizeof(buf));
while (rsize > 0) {
@@ -239,13 +239,13 @@ int main(int argc, char **argv) {
md5_append(&state, (const md5_byte_t *)buf, rsize);
rsize = read(check_fd, buf, sizeof(buf));
}
-
+
close(check_fd);
md5_finish(&state, digest);
-
+
for (i = 0; i < 16; i++)
sprintf(hex_output + i * 2, "%02x", digest[i]);
-
+
if (strncmp(hex_output, checksum, strlen(hex_output)) == 0) {
usplash_success(pipe_fd, "OK");
} else {
@@ -266,5 +266,5 @@ int main(int argc, char **argv) {
getchar();
reboot(LINUX_REBOOT_CMD_RESTART);
return 0;
-
+
}
diff --git a/bin/live-md5check/md5.h b/bin/live-md5check/md5.h
index 698c995..3baa4dc 100644
--- a/bin/live-md5check/md5.h
+++ b/bin/live-md5check/md5.h
@@ -71,7 +71,7 @@ typedef struct md5_state_s {
} md5_state_t;
#ifdef __cplusplus
-extern "C"
+extern "C"
{
#endif
diff --git a/bin/live-snapshot b/bin/live-snapshot
index e3e05fe..b803b15 100755
--- a/bin/live-snapshot
+++ b/bin/live-snapshot
@@ -1,10 +1,10 @@
#! /bin/bash
-# casper-snapshot - utility to manage Debian Live systems snapshots
+# live-snapshot - utility to manage Debian Live systems snapshots
#
# This program mount a device (fallback to /tmpfs under /mnt/snapshot
# and save the /cow (or a different dir) filesystem in it for reusing
-# in another casper session. Look at manpage for more info.
+# in another live-initramfs session. Look at manpage for more info.
#
# Copyright (C) 2006 Marco Amadori <marco.amadori@gmail.com>
#
@@ -122,7 +122,7 @@ Version ()
echo "On Debian systems, the complete text of the GNU General Public License"
echo "can be found in /usr/share/common-licenses/GPL file."
echo
- echo "Homepage: <http://live.debian.net/>"
+ echo "Homepage: <http://debian-live.alioth.debian.org/>"
exit 0
}
@@ -234,7 +234,7 @@ Defaults ()
COW=$(echo "${SNAP_RSTRING}" | cut -f1 -d ':')
DEV=$(echo "${SNAP_RSTRING}" | cut -f2 -d ':')
DEST=$(echo "${SNAP_RSTRING}" | cut -f3 -d ':')
-
+
case "${DEST}" in
*.cpio.gz)
TYPE="cpio" ;;
@@ -255,7 +255,7 @@ Defaults ()
else
COW="${SNAP_COW}"
fi
-
+
case "${SNAP_TYPE}" in
"cpio"|"squashfs"|"ext2")
TYPE="${SNAP_TYPE}"
@@ -266,8 +266,8 @@ Defaults ()
Usage "Error: unrecognized snapshot type"
;;
esac
- #if [ -d
- #if Is_same_mount
+ #if [ -d
+ #if Is_same_mount
fi
# check vars
@@ -284,7 +284,7 @@ Clean ()
if [ -n "$DEV" ]; then
umount "${MOUNTP}"
rmdir "${MOUNTP}"
- rm
+ #rm
fi
}