RE: preinstall section - how to backup ssh keys?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 1 Dec 2003, Egan Ford wrote:

> Create a small background process in %pre.
> 
> E.g.
> 
> %pre
> 
> mount whatever to get my / if not mounted
> mkdir /tmp/ssh
> cp /mountpoint/etc/ssh/* /tmp/ssh
> umount /mountpoint
> while :
> do
> 	if [ -d /mnt/sysimage/etc/ssh ]
> 	then
> 		sleep 10 # let ssh rpm finish any post work
> 		cp -f /tmp/ssh/* /mnt/sysimage/etc/ssh
> 		break
> 	fi
> 	sleep 1
> done &
> 
> This will loop forever until /mnt/sysimage/etc/ssh exists as part of the ssh rpm
> install.  Then the files will be copied over.  I am doing something similar for
> remote monitoring.
>
Very creative.  I definately will store this in my bag of cool hacks
for anaconda.  I personally, though, would rather put the part that copies 
the keys in place in %post to be absolutely sure ssh stuff was done 
loading but hey, I can see this definately would work (and as I said its 
quite a cool hack (-:).

Cheers...james

> 




[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux