Hi,

Please don't send HTML e-mail!
http://www.georgedillon.com/web/html_email_is_evil.shtml
http://www.birdhouse.org/etc/evilmail.html
http://www.efn.no/html-bad.html

--- On Tue, Dec 30, 2008 at 11:23 PM, Ratnadeep Debnath
<[email protected]> wrote:
| Hi everyone,
| This is an attempt to automate the setup of a local Fedora-mirror just by
| executing a single shell script ( as a root user).
\--

With sudo, perhaps?

---
| 1)mirror-setup.sh
|
| #!/bin/sh
|
| cd /media/My\ storage/fedora-mirror/
\--

* No magic numbers please. Use a variable to assign "/media/My\
storage/fedora-mirror/".

* Add some comments in your shell scripts.

* Add  your name, contact e-mail, year, license information in the script!
http://www.fsf.org/licensing/licenses/gpl-howto.html

---
| sh ./mirror-start.sh
| echo You are now ready to install packages offline…To  quit…enter 'exit'
\--

* What happens if the user types anything other than 'exit'?

---
| su -
\--

* What if this fails? By this time you have already started mirror-start.sh.

---
| wget -ivh ftp://127.0.0.1/pub/yum/*
\--

* Why FTP on a localhost? Why not simply cp?

---
| rm  /etc/yum.repos.d/*
| mv /tmp/yum.repos.bak/* /etc/yum.repos.d/
|
| rm -r /tmp/yum.repos.bak
\--

All magic numbers. Replace with variables.

The idea of having separate shell scripts is that they can be invoked
independently of each other. You can put mirror-start and mirror-stop
as functions in the same shell script, since, they are dependent on
one another.

SK

-- 
Shakthi Kannan
http://www.shakthimaan.com
_______________________________________________
Users mailing list
[email protected]
http://lists.dgplug.org/listinfo.cgi/users-dgplug.org

Reply via email to