~ubuntu-branches/ubuntu/quantal/puppet/quantal

« back to all changes in this revision

Viewing changes to acceptance/tests/resource/service/ticket_4124_should_list_all_disabled.sh

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-07-14 01:56:30 UTC
  • mfrom: (1.1.29) (3.1.43 sid)
  • Revision ID: package-import@ubuntu.com-20120714015630-ntj41rkvkq4zph4y
Tags: 2.7.18-1ubuntu1
* Resynchronise with Debian. (LP: #1023931) Remaining changes:
  - debian/puppetmaster-passenger.postinst: Make sure we error if puppet
    config print doesn't work
  - debian/puppetmaster-passenger.postinst: Ensure upgrades from
    <= 2.7.11-1 fixup passenger apache configuration.
* Dropped upstreamed patches:
  - debian/patches/CVE-2012-1906_CVE-2012-1986_to_CVE-2012-1989.patch
  - debian/patches/puppet-12844
  - debian/patches/2.7.17-Puppet-July-2012-CVE-fixes.patch
* Drop Build-Depends on ruby-rspec (in universe):
  - debian/control: remove ruby-rspec from Build-Depends
  - debian/patches/no-rspec.patch: make Rakefile work anyway if rspec
    isn't installed so we can use it in debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
# A platform must be specified the only command line arg
4
 
# This will facilitate expansion of this tests to include
5
 
# the ability to test other OSes
6
 
 
7
 
RALSH_FILE=/tmp/ralsh-disabled-list-$$
8
 
SERVICE_FILE=/tmp/service-disabled-list-$$
9
 
 
10
 
puppet resource service | egrep -B2 "enable.*=>.*'false" | grep "service {" | awk -F"'" '{print $2}' | sort  > $RALSH_FILE
11
 
 
12
 
if [ -e $SERVICE_FILE ]; then
13
 
  rm $SERVICE_FILE
14
 
fi
15
 
 
16
 
SERVICEDIR='/etc/init.d'
17
 
for SERVICE in $( ls $SERVICEDIR | sort | egrep -v "(functions|halt|killall|single|linuxconf)" ) ; do
18
 
  if ! chkconfig $SERVICE; then
19
 
    echo $SERVICE >> $SERVICE_FILE
20
 
  fi
21
 
done
22
 
 
23
 
if diff $RALSH_FILE $SERVICE_FILE ; then
24
 
  echo "Ralsh and system service count agree"
25
 
  exit 0
26
 
else
27
 
  echo "Ralsh and system service count NOT in agreement"
28
 
  exit 1
29
 
fi