Ratnadeep Debnath wrote:

1)mirror-setup.sh

        #!/bin/sh

        cd /media/My\ storage/fedora-mirror/

        sh ./mirror-start.sh
echo You are now ready to install packages offline…To quit…enter 'exit'
        su -
        sh /media/My\ storage/fedora-mirror/mirror-stop.sh
        echo Local Fedora-mirror stopped…


how do you plan to capture user's input ?

i would think this way :

read -p "the script is now going to setup local mirror. Do you want to continue or quit (type yes if want to continue or no to quit): " <variablename>

if [ $<variablename> = "yes" ]

then

<insert the setup script>
else

echo " you choose not to continue"
exit 0

fi


_______________________________________________
Users mailing list
[email protected]
http://lists.dgplug.org/listinfo.cgi/users-dgplug.org

Reply via email to