gringomike
Technical User
Hi folks!
I'm trying to script the refresh of a file system and have compiled the code below. This works fine but for the fact I have to hit the <enter> key once it gets to the /usr/sbin/vxassist -g rootdg make test_fs 1g disk01 line where the script just hangs until the user intervenes:-(
Does anybody know why this is and how I can get around it?
Cheers!
GM
ANS=y
echo "dumping /usr/bin/nsr from JUPITER....."
rsh jupiter /usr/sbin/ufsdump 0uf venus:/apps/JUPITER_apps/JUPITER_test /usr/bin/nsr
echo "dump of /usr/bin/nsr complete"
echo "unmounting /test_fs....."
/usr/sbin/umount -f /test_fs
echo "/test_fs unmounted successfully"
echo "re-creating /test_fs file system....."
/usr/sbin/vxedit -g rootdg -rf rm test_fs
/usr/sbin/vxassist -g rootdg make test_fs 1g disk01
/usr/sbin/newfs /dev/vx/rdsk/rootdg/test_fs |read $ANS
/usr/sbin/mount -o rw /dev/vx/dsk/rootdg/test_fs /test_fs
echo "/test_fs file system re-created"
echo "restoring the /test_fs file system"
cp /apps/JUPITER_apps/JUPITER_test /test_fs
cd /test_fs
/usr/sbin/ufsrestore rf JUPITER_test
/usr/sbin/umount -f /test_fs
/usr/sbin/mount -o ro /dev/vx/dsk/rootdg/test_fs /test_fs
echo "/test_fs file system restored as read only"
I'm trying to script the refresh of a file system and have compiled the code below. This works fine but for the fact I have to hit the <enter> key once it gets to the /usr/sbin/vxassist -g rootdg make test_fs 1g disk01 line where the script just hangs until the user intervenes:-(
Does anybody know why this is and how I can get around it?
Cheers!
GM
ANS=y
echo "dumping /usr/bin/nsr from JUPITER....."
rsh jupiter /usr/sbin/ufsdump 0uf venus:/apps/JUPITER_apps/JUPITER_test /usr/bin/nsr
echo "dump of /usr/bin/nsr complete"
echo "unmounting /test_fs....."
/usr/sbin/umount -f /test_fs
echo "/test_fs unmounted successfully"
echo "re-creating /test_fs file system....."
/usr/sbin/vxedit -g rootdg -rf rm test_fs
/usr/sbin/vxassist -g rootdg make test_fs 1g disk01
/usr/sbin/newfs /dev/vx/rdsk/rootdg/test_fs |read $ANS
/usr/sbin/mount -o rw /dev/vx/dsk/rootdg/test_fs /test_fs
echo "/test_fs file system re-created"
echo "restoring the /test_fs file system"
cp /apps/JUPITER_apps/JUPITER_test /test_fs
cd /test_fs
/usr/sbin/ufsrestore rf JUPITER_test
/usr/sbin/umount -f /test_fs
/usr/sbin/mount -o ro /dev/vx/dsk/rootdg/test_fs /test_fs
echo "/test_fs file system restored as read only"