Old Vens
30th August 2002, 15:39
Hi,
Does anybody know how to force ufsdump utility to work under the script control. The single problem is that after making the dump (just OK ) the utility asks whether to restore files privileges and owners ? Yes or no? And waits for interactive input. The script stops and waits also. It has -y (yes) option but it concerns another case, not file privileges. What is the correct way of getting the standart "y" input and make it work without using keyboard.
It is SunOS 5.8. Solaris 8.
Thanks.

patvdv
30th August 2002, 15:42
Pipe it into 'yes'?

Old Vens
4th September 2002, 14:30
Pat, first of all i had misspelled utility name - of course i was asking about ufsrestore. The problem is that it asks for input twice - the volume number (some positive digit) and only after it y or n for stamping file permissions and owners. Any idea of echoing twice?

patvdv
4th September 2002, 14:37
Normally the 'yes' command will output a 'y' repetively so it should not matter how many question ufsrestore is asking. Did you try:

# yes | ufsrestore <options>

Old Vens
4th September 2002, 14:52
The problem is that ufsrestore asks DIFFERENT questions and you have first time type '1' and then f.e. y

patvdv
4th September 2002, 15:02
Oh oh my fault, I did not read your post correctly :rolleyes:

What if you put the all the answers - if you know them - in a text file, then redirect the file into the command?

Old Vens
4th September 2002, 15:34
Pat , i put all the output in text file (corrected in vi),
maybe the solution is quite simple smth. like two pipes with 1 and y.

patvdv
4th September 2002, 15:52
Mmm, maybe the tool requires hard terminal input to work. I don't have a Solaris box here but I see that the ufsrestore command has the '-rsf' switches for non-interactive/non-verbose mode. Have you tried playing around with them?

Old Vens
5th September 2002, 07:58
Hi, Pat

None of the options make effect at the problem. Even worse- Solaris began to ask more questions :)
The solution we found out was very simple. Here is line we used at last :
echo "1\ry\r"|ufsrestore xvf /dev/rmt/1

patvdv
5th September 2002, 10:10
Now why didn't I think of that? :rolleyes:

Old Vens
5th September 2002, 10:27
Pat, maybe because it turned out to be too simple :)
One more question i am asking for a while but still having no result. Where can anyone order and buy new version of Knowledge Quest Folio? Our contractors also have only 1997 issue. Baan had changed since that time.) I don't think it costs a lot. Can you prompt? :

patvdv
5th September 2002, 10:37
Old Vens,

I have no idea. I would not be surprised if the KQ CD is not supported/updated anymore. Maybe one of our Baan members can shed some more light?

Old Vens
5th September 2002, 12:32
It's a pity then.
Unfortunately nobody prompted me about KQ. Some don't know about it at all. And yours version also dated by 1997? Maybe KQ indeed got ruined?

patvdv
5th September 2002, 13:07
Yep, my version is ancient.