12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

138CHAPTER 5Working with RPM SoftwareLISTING 5.8Example startvpn Script#!/bin/bashecho “startvpn script executed”This example package depends on the vpnc package to work properly. An example specfile, startvpn.spec, can be found in Listing 5.9.NOTEThis is a very simplistic example that does not require the code to be compiled or anypost commands to be executed. It is intended to illustrate how building an RPM canbe useful for a system administrator. For more advanced building options, refer to theRPM Guide available at http://fedora.redhat.com/docs/drafts/rpm-guide-en/ from theFedora Project.LISTING 5.9Example spec FileName: startvpnSummary: Custom script to start VPNVersion: 1.1Release: 1License: GPLGroup: Applications/InternetURL: http://www.example.org/Source0: %{name}-%{version}.tar.gzBuildRoot: %{_tmppath}/%{name}-%{version}-%{release}BuildArch: noarchRequires: bashRequires: vpnc%descriptionCustom script to start VPN and connect to company’s private network.For company use only.%prep%setup -q%install#rm -fr $RPM_BUILD_ROOTmake INSTROOT=$RPM_BUILD_ROOT install%cleanrm -fr $RPM_BUILD_ROOT

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!