Hi,

--- On Wed, Sep 23, 2009 at 9:18 PM, Shakthi Kannan
<[email protected]> wrote:
| #001: Create a target check_vsftp in the Makefile, to check if vsftp
| is installed on the offline
| repo server machine, else, need to install it.
\--

>From commit  02de41d ...

=== Makefile ===

CC = gcc
GLIB_FLAG = `pkg-config --cflags --libs glib-2.0`

check_vsftp : check_vsftp.o
        $(CC) -o check_vsftp check_vsftp.o $(GLIB_FLAG)
        ./check_vsftp
check_vsftp.o:check_vsftp.c
        $(CC) -c check_vsftp.c $(GLIB_FLAG)

clean :
        rm -rf *.o

=== END ===

1. Please remove all other files in your repository. I would like only
the Makefile to exist.

2. By checking for vsftp, I meant checking if the package is
installed. While the repository need to necessarily be a RPM-based
distro, for our case, we will assume it is one.

It could be as simple as doing:

  $ rpm -qa | grep ^vsftpd | wc -l

If the package is installed, the above should return 1, else 0. Store
the return value in a variable in the Makefile, and echo the result
(whether it exists or not) in the output.

There is also a system-config-vsftpd package in Fedora, so the above
pattern matches only vsftpd package.

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