From fd8bbba2f02b8bccd69e67c326fd320c0827941d Mon Sep 17 00:00:00 2001 From: Mageia SVN-Git Migration Date: Sun, 6 Feb 2011 22:37:08 +0000 Subject: Synthesized commit during git-svn import combining previous Mandriva history with Mageia. This commit consitsts of the following subversion commits: ------------------------------------------------------------------------ r431 | dmorgan | 2011-02-06 01:58:02 +0000 (Sun, 06 Feb 2011) | 1 line Add drakx structure on the SVN ------------------------------------------------------------------------ r432 | dmorgan | 2011-02-06 01:59:38 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned advertising ------------------------------------------------------------------------ r446 | dmorgan | 2011-02-06 22:37:08 +0000 (Sun, 06 Feb 2011) | 1 line Import Clean perl-install ------------------------------------------------------------------------ r448 | dmorgan | 2011-02-06 23:02:36 +0000 (Sun, 06 Feb 2011) | 1 line Add cleaned files ------------------------------------------------------------------------ r449 | dmorgan | 2011-02-06 23:03:52 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned kernel ------------------------------------------------------------------------ r450 | dmorgan | 2011-02-06 23:23:30 +0000 (Sun, 06 Feb 2011) | 1 line Import cleaned tools ------------------------------------------------------------------------ r451 | dmorgan | 2011-02-07 00:01:56 +0000 (Mon, 07 Feb 2011) | 1 line Import stage1 ------------------------------------------------------------------------ r473 | dmorgan | 2011-02-07 11:20:50 +0000 (Mon, 07 Feb 2011) | 1 line Import images ------------------------------------------------------------------------ r497 | ennael | 2011-02-09 21:02:06 +0000 (Wed, 09 Feb 2011) | 2 lines readd missing file ------------------------------------------------------------------------ r502 | pterjan | 2011-02-09 23:30:32 +0000 (Wed, 09 Feb 2011) | 1 line Import rescue ------------------------------------------------------------------------ r603 | ennael | 2011-02-24 13:32:54 +0000 (Thu, 24 Feb 2011) | 2 lines import cleaned rescue for Mageia ------------------------------------------------------------------------ r2061 | tv | 2011-10-20 20:32:19 +0100 (Thu, 20 Oct 2011) | 1 line import (cleaned) doc ------------------------------------------------------------------------ --- rescue/Flash/scripts/reset_userpass | 110 ------------------------------------ 1 file changed, 110 deletions(-) delete mode 100755 rescue/Flash/scripts/reset_userpass (limited to 'rescue/Flash/scripts/reset_userpass') diff --git a/rescue/Flash/scripts/reset_userpass b/rescue/Flash/scripts/reset_userpass deleted file mode 100755 index e7c5477eb..000000000 --- a/rescue/Flash/scripts/reset_userpass +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/bash - -# import functions library -source rescue_common - -tmpdir="/tmp/flash-rescue-root" -rootdir="$tmpdir/pen" - -function prepare() { - - modprobe unionfs > /dev/null 2>&1 - modprobe sqlzma > /dev/null 2>&1 - modprobe squashfs-lzma > /dev/null 2>&1 - modprobe squashfs > /dev/null 2>&1 - modprobe loop > /dev/null 2>&1 - - mkdir -p $rootdir - mkdir -p $tmpdir/squash - mkdir -p $tmpdir/user - mkdir -p $tmpdir/union - - if ! mount_usbroot $rootdir; then - return 1 - fi - - set_sfs_loop $rootdir - - mount -t squashfs -o loop $sfs_loop $tmpdir/squash > /dev/null 2>&1 - if [ $? -ne 0 ]; then - echo "Error mounting distrib.sqfs" - return 1 - fi - - mount -t ext2 -o loop $sys_loop $tmpdir/user > /dev/null 2>&1 - if [ $? -ne 0 ]; then - echo "Error mounting system.loop" - return 1 - fi - - mount -t unionfs -o dirs=$tmpdir/user=rw:$tmpdir/squash=ro \ - none $tmpdir/union > /dev/null 2>&1 - if [ $? -ne 0 ]; then - echo "Error creating union of distrib.sqfs and system.loop" - return 1 - fi - - chroot $tmpdir/union /etc/init.d/keytable start &> /dev/null - chroot $tmpdir/union /usr/bin/unicode_start - - return 0 -} - -function doit() { - - username=$(tail -1 $tmpdir/union/etc/passwd | cut -d ':' -f1) - - clear - echo - echo -n "What is your username? [$username] " - read name - - if [ -z "$name" ]; then - name="$username" - fi - - echo - echo - chroot $tmpdir/union passwd $name - echo - echo - - return 0 -} - -function cleanup() { - - chroot $tmpdir/union /usr/bin/unicode_stop - - umount $tmpdir/union > /dev/null 2>&1 - lumount $tmpdir/user > /dev/null 2>&1 - lumount $tmpdir/squash > /dev/null 2>&1 - umount $rootdir > /dev/null 2>&1 - - rmdir $tmpdir/union $tmpdir/user $tmpdir/squash 2> /dev/null - rmdir $rootdir $tmpdir 2> /dev/null -} - -clear -trap cleanup SIGINT - -version="" -if ! insert_pendrive; then - exit 1 -fi - -sys_loop="$rootdir$loopbacks_rel/system.loop" -sfs_loop= # - -if ! prepare; then - cleanup - exit 1 -fi - -if ! doit; then - cleanup - exit 1 -fi - -cleanup -exit 0 -- cgit v1.2.1