diff options
Diffstat (limited to 'rescue')
-rwxr-xr-x | rescue/Flash/scripts/backup_systemloop | 106 | ||||
-rwxr-xr-x | rescue/Flash/scripts/clear_systemloop | 89 | ||||
-rw-r--r-- | rescue/Flash/scripts/rescue_common | 205 | ||||
-rwxr-xr-x | rescue/Flash/scripts/reset_rootpass | 99 | ||||
-rwxr-xr-x | rescue/Flash/scripts/reset_userpass | 110 | ||||
-rwxr-xr-x | rescue/Flash/scripts/restore_systemloop | 167 | ||||
-rwxr-xr-x | rescue/Flash/scripts/test_badblocks | 69 | ||||
-rwxr-xr-x | rescue/Flash/scripts/upgrade | 307 | ||||
-rwxr-xr-x | rescue/Flash/scripts/upgrade.merge-users | 52 | ||||
-rw-r--r-- | rescue/Makefile | 2 | ||||
-rw-r--r-- | rescue/NEWS | 3 | ||||
-rwxr-xr-x | rescue/guessmounts | 2 | ||||
-rwxr-xr-x | rescue/install_bootloader | 4 | ||||
-rw-r--r-- | rescue/list.xml | 2 | ||||
-rwxr-xr-x | rescue/make_partimage_save_rest_all | 2 | ||||
-rwxr-xr-x | rescue/rescue-doc | 14 | ||||
-rwxr-xr-x | rescue/restore-image-lib.sh | 4 | ||||
-rw-r--r-- | rescue/tree/etc/hosts | 2 | ||||
-rw-r--r-- | rescue/tree/etc/issue | 2 | ||||
-rwxr-xr-x | rescue/tree/etc/rc.sysinit | 2 |
20 files changed, 19 insertions, 1224 deletions
diff --git a/rescue/Flash/scripts/backup_systemloop b/rescue/Flash/scripts/backup_systemloop deleted file mode 100755 index 65c3185e6..000000000 --- a/rescue/Flash/scripts/backup_systemloop +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/bash - -# import functions library -source rescue_common - -tmpdir="/tmp/flash-rescue-root" -rootdir="$tmpdir/pen" - -function prepare() { - - mkdir -p $rootdir - - if ! mount_usbroot $rootdir; then - return 1 - fi - - if [ x"$version" = x"1.0" ]; then - mkdir -p $tmpdir/shared - if ! mount_sharedroot $tmpdir/shared; then - return 1 - fi - fi - - if [ ! -d $dir ]; then - mkdir $dir - fi - - return 0 -} - -function doit() { - - clear - echo - echo -n 'Creating backup file. This can take some time: ' - - bzip2 -c $loop > $target 2> /tmp/rescue-backup.err & - - sleep 2 - - while ps | grep -q bzip2; do - progress - done - - sync - - echo - echo - - errsize=$(ls -la /tmp/rescue-backup.err | cut -d' ' -f5) - if [ $errsize -ne 0 ]; then - echo "Error compressing user files into $target" - return 1 - else - echo 'Backup file created!' - fi - - echo - - return 0 -} - -function cleanup() { - - if [ x"$version" = x"1.0" ]; then - umount $tmpdir/shared > /dev/null 2>&1 - rmdir $tmpdir/shared - fi - - umount $rootdir > /dev/null 2>&1 - rmdir $rootdir $tmpdir 2> /dev/null - - return 0 -} - -clear -trap cleanup SIGINT - -version="" -if ! insert_pendrive; then - exit 1 -fi - -if [ x"$version" = x"1.0" ]; then - dir="$tmpdir/shared/backup" - loop="$rootdir/loopbacks/system.loop" -else - dir="$rootdir/backup" - loop="$rootdir/.loopbacks/system.loop" -fi - -file="backup-$(date +%Y%m%d).bz2" -target="$dir/$file" - -if ! prepare; then - cleanup - exit 1 -fi - -if ! doit; then - cleanup - exit 1 -fi - -cleanup -exit 0 diff --git a/rescue/Flash/scripts/clear_systemloop b/rescue/Flash/scripts/clear_systemloop deleted file mode 100755 index 4152b16bf..000000000 --- a/rescue/Flash/scripts/clear_systemloop +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash - -# import functions library -source rescue_common - -tmpdir="/tmp/flash-rescue-root" -rootdir="$tmpdir/pen" - -function prepare() { - - mkdir -p $rootdir - - if ! mount_usbroot $rootdir; then - return 1 - fi - - return 0 -} - -function doit() { - - clear - echo - echo "WARNING!" - echo - echo "Mandriva Flash will be reset to factory defaults!" - echo -n "All user files, customizations and new packages installed " - echo "will be removed." - echo - echo "This process may take a few minutes." - echo - echo -n "Do you want to continue? [N/y] " - read confirm - - if [ x"$confirm" = x"y" -o x"$confirm" = x"Y" ]; then - - if [ ! -f $loop ] || [ x"$version" != x"1.0" ]; then - dd if=/dev/zero of=$loop bs=1000000 count=1000 - fi - - if [ x"$version" = x"1.0" ]; then - /sbin/mkfs.ext2 -q -F $loop - fi - - echo - if [ $? -ne 0 ]; then - echo 'Error resetting device to factory defaults' - return 1 - else - echo 'Mandriva Flash was restored to factory defaults!' - fi - fi - - echo - - return 0 -} - -function cleanup() { - - umount $rootdir > /dev/null 2>&1 <
-} - -clear -trap cleanup SIGINT <
png_write_image(png_ptr, row_pointers);
/* end write */
if (setjmp(png_jmpbuf(png_ptr)))
abort_("[write_png_file] Error during end of write");
png_write_end(png_ptr, NULL);
}
void process_file(char* shift)
{
int shift_ = atoi(shift);
if (info_ptr->color_type != PNG_COLOR_TYPE_RGBA)
abort_("[process_file] color_type of input file must be PNG_COLOR_TYPE_RGBA (is %d)", info_ptr->color_type);
width -= shift_;
for (y=0; y<height; y++) {
row_pointers[y] += 4 * shift_;
}
}
int main(int argc, char **argv)
{
if (argc != 4)
abort_("Usage: program_name <file_in> <file_out> <shift>");
read_png_file(argv[1]);
process_file(argv[3]);
write_png_file(argv[2]);
}
|