[comp.unix.questions] /etc/restore

mchinni@pica.army.mil (Michael J. Chinni, SMCAR-CCS-E) (05/26/89)

Help!

I am trying to set up an automated shell script to build my backup
root partitions over night. The guts of what I have now is as follows:
# Prepare and make the back-up
/etc/umount ${devname}
/etc/newfs -v ${devname}
/etc/mount -v ${devname} ${bkroot}
/etc/dump 0f - ${root} | (cd ${bkroot} ; /etc/restore xfy -)

This works fine EXCEPT that I can't figure a way to give an automatic answer to
restore's question:
set owner mode for '.' [y/n] ?

I have tried changing the last line to:
(/etc/dump 0f - ${root} ; echo "y" ) | (cd ${bkroot} ; /etc/restore xfy -)
hoping that restore would pick up the "y" from stdin. This doesn't work.

Can anyone suggest a way to give restore an automatic answer ?

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
			    Michael J. Chinni
      Chief Scientist, Simulation Techniques and Workplace Automation Team
	 US Army Armament Research, Development, and Engineering Center
 User to skeleton sitting at cobweb   () Picatinny Arsenal, New Jersey  
    and dust covered workstation      () ARPA: mchinni@pica.army.mil
      "System been down long?"        () UUCP: ...!uunet!pica.army.mil!mchinni
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/