Mageia Bugzilla – Attachment 995 Details for
Bug 1023
missing packages in rescue mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
svn diff /soft/drakx/trunk/rescue
drakx-fix_dropbear_screen.patch (text/plain), 3.47 KB, created by
AL13N
on 2011-10-23 03:05:30 CEST
(
hide
)
Description:
svn diff /soft/drakx/trunk/rescue
Filename:
MIME Type:
Creator:
AL13N
Created:
2011-10-23 03:05:30 CEST
Size:
3.47 KB
patch
obsolete
>Index: tree/etc/fstab >=================================================================== >--- tree/etc/fstab (revision 2063) >+++ tree/etc/fstab (working copy) >@@ -1,4 +1,5 @@ > /dev/ram3 / ext2 defaults 1 1 > /dev/fd0 /mnt/floppy auto defaults,noauto 0 0 > none /proc proc defaults,noauto,ro 0 0 >+devpts /dev/pts devpts defaults,noauto,rw 0 0 > /dev/cdrom /mnt/cdrom auto defaults,noauto 0 0 >Index: tree/etc/rc.sysinit >=================================================================== >--- tree/etc/rc.sysinit (revision 2063) >+++ tree/etc/rc.sysinit (working copy) >@@ -11,14 +11,20 @@ > action "Remounting root filesystem in read-write mode" mount -n -o remount,rw / > > ln -s /tmp/stage2/etc/* /etc 2>/dev/null >+# make passwd changable >+rm -f /etc/passwd >+cp /tmp/stage2/etc/passwd /etc/ > > rm -f /dev ; cp -a /tmp/stage2/dev /dev > >-mkdir -p /mnt /var/log >+mkdir -p /mnt /var/log /dev/pts > > >/etc/mtab > mount -f / > mount -f /proc >+# mount /dev/pts and link /dev/ptmx so dropbear works >+mount /dev/pts >+ln -s /dev/pts/ptmx /dev/ptmx > > # Set the hostname. > action "Setting hostname rescue" hostname rescue >Index: tree/etc/issue >=================================================================== >--- tree/etc/issue (revision 2063) >+++ tree/etc/issue (working copy) >@@ -24,5 +24,6 @@ > Use [1;33;40mmodprobe[0m to load modules (eg: modprobe snd-card-fm801) > Use [1;33;40mdrvinst[0m to install drivers according to detected devices > Use [1;33;40mlsparts[0m to list your partitions with types >+Use [1;33;40mstartssh[0m to start an ssh daemon > Use [1;33;40mrescue-gui[0m to go back to the rescue menu > >Index: passwd >=================================================================== >--- passwd (revision 0) >+++ passwd (revision 0) >@@ -0,0 +1,10 @@ >+#!/usr/bin/perl >+ >+system "stty -echo"; >+print STDERR "Password: "; >+chomp($word = <STDIN>); >+print STDERR "\n"; >+system "stty echo"; >+ >+print crypt($word, join('', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64])); >+print "\n"; > >Property changes on: passwd >___________________________________________________________________ >Added: svn:executable > + * > >Index: list.xml >=================================================================== >--- list.xml (revision 2063) >+++ list.xml (working copy) >@@ -65,6 +65,11 @@ > > btrfs btrfsck btrfs-convert btrfsctl btrfs-debug-tree > btrfs-map-logical btrfs-show btrfs-vol mkfs.btrfs fsck.btrfs >+ >+ dropbear dropbearkey >+ >+ screen >+ > <if ARCH="i.86|x86_64"> > mkfs.jfs fsck.jfs jfs_tune > </if> >@@ -247,6 +252,7 @@ > termcap > protocols > services >+ shells > ssh/ssh_config > </from> > >@@ -322,7 +328,9 @@ > </from> > <from dir="."> > <to dir="/usr/sbin"> >- diskdrake-resize >+ diskdrake-resize >+ passwd >+ startssh > </to> > <to dir="/usr/sbin"> > restore-image.sh >Index: startssh >=================================================================== >--- startssh (revision 0) >+++ startssh (revision 0) >@@ -0,0 +1,18 @@ >+#!/bin/bash >+ >+passwd=`passwd` >+ >+if (( $? != 0 )); then >+ reset >+ exit $? >+fi >+ >+sed -E -i -e 's/^root:[^:]*:/root:'"$passwd"':/' /etc/passwd >+ >+mkdir -p /etc/dropbear >+[[ -f /etc/dropbear/dropbear_dss_host_key ]] || dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key >+[[ -f /etc/dropbear/dropbear_rsa_host_key ]] || dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key >+ >+echo "" >+echo -n "Starting ssh daemon... " >+dropbear && echo "OK" > >Property changes on: startssh >___________________________________________________________________ >Added: svn:executable > + * >
Index: tree/etc/fstab =================================================================== --- tree/etc/fstab (revision 2063) +++ tree/etc/fstab (working copy) @@ -1,4 +1,5 @@ /dev/ram3 / ext2 defaults 1 1 /dev/fd0 /mnt/floppy auto defaults,noauto 0 0 none /proc proc defaults,noauto,ro 0 0 +devpts /dev/pts devpts defaults,noauto,rw 0 0 /dev/cdrom /mnt/cdrom auto defaults,noauto 0 0 Index: tree/etc/rc.sysinit =================================================================== --- tree/etc/rc.sysinit (revision 2063) +++ tree/etc/rc.sysinit (working copy) @@ -11,14 +11,20 @@ action "Remounting root filesystem in read-write mode" mount -n -o remount,rw / ln -s /tmp/stage2/etc/* /etc 2>/dev/null +# make passwd changable +rm -f /etc/passwd +cp /tmp/stage2/etc/passwd /etc/ rm -f /dev ; cp -a /tmp/stage2/dev /dev -mkdir -p /mnt /var/log +mkdir -p /mnt /var/log /dev/pts >/etc/mtab mount -f / mount -f /proc +# mount /dev/pts and link /dev/ptmx so dropbear works +mount /dev/pts +ln -s /dev/pts/ptmx /dev/ptmx # Set the hostname. action "Setting hostname rescue" hostname rescue Index: tree/etc/issue =================================================================== --- tree/etc/issue (revision 2063) +++ tree/etc/issue (working copy) @@ -24,5 +24,6 @@ Use [1;33;40mmodprobe[0m to load modules (eg: modprobe snd-card-fm801) Use [1;33;40mdrvinst[0m to install drivers according to detected devices Use [1;33;40mlsparts[0m to list your partitions with types +Use [1;33;40mstartssh[0m to start an ssh daemon Use [1;33;40mrescue-gui[0m to go back to the rescue menu Index: passwd =================================================================== --- passwd (revision 0) +++ passwd (revision 0) @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +system "stty -echo"; +print STDERR "Password: "; +chomp($word = <STDIN>); +print STDERR "\n"; +system "stty echo"; + +print crypt($word, join('', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64])); +print "\n"; Property changes on: passwd ___________________________________________________________________ Added: svn:executable + * Index: list.xml =================================================================== --- list.xml (revision 2063) +++ list.xml (working copy) @@ -65,6 +65,11 @@ btrfs btrfsck btrfs-convert btrfsctl btrfs-debug-tree btrfs-map-logical btrfs-show btrfs-vol mkfs.btrfs fsck.btrfs + + dropbear dropbearkey + + screen + <if ARCH="i.86|x86_64"> mkfs.jfs fsck.jfs jfs_tune </if> @@ -247,6 +252,7 @@ termcap protocols services + shells ssh/ssh_config </from> @@ -322,7 +328,9 @@ </from> <from dir="."> <to dir="/usr/sbin"> - diskdrake-resize + diskdrake-resize + passwd + startssh </to> <to dir="/usr/sbin"> restore-image.sh Index: startssh =================================================================== --- startssh (revision 0) +++ startssh (revision 0) @@ -0,0 +1,18 @@ +#!/bin/bash + +passwd=`passwd` + +if (( $? != 0 )); then + reset + exit $? +fi + +sed -E -i -e 's/^root:[^:]*:/root:'"$passwd"':/' /etc/passwd + +mkdir -p /etc/dropbear +[[ -f /etc/dropbear/dropbear_dss_host_key ]] || dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key +[[ -f /etc/dropbear/dropbear_rsa_host_key ]] || dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_key + +echo "" +echo -n "Starting ssh daemon... " +dropbear && echo "OK" Property changes on: startssh ___________________________________________________________________ Added: svn:executable + *
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1023
: 995