on older systems, zypper service and zypper repos

doesn't know the parameter -E,
so we need a way which works on older releases too
remotes/origin/4.0-pre-not-stable
Daniel Heule 11 years ago
parent f165b5611e
commit aec1632627
  1. 4
      cdist/conf/type/__zypper_repo/explorer/enabled_repo_ids
  2. 5
      cdist/conf/type/__zypper_service/explorer/repo_ids
  3. 4
      cdist/conf/type/__zypper_service/explorer/service_id
  4. 4
      cdist/conf/type/__zypper_service/explorer/service_ids
  5. 4
      cdist/conf/type/__zypper_service/explorer/service_uri

@ -21,4 +21,6 @@
# Retrieve all repo id nummbers from enabled repos - parsed zypper output
#
#
echo $(zypper lr -E | cut -d'|' -f 1 | grep -E '^[0-9]')
# simpler command which works only on SLES11 SP3 or newer:
# echo $(zypper lr -E | cut -d'|' -f 1 | grep -E '^[0-9]')
echo $(zypper lr | grep -E '^[0-9]([^|]+\|){3,3} Yes' | cut -d'|' -f 1)

@ -21,4 +21,7 @@
# Manage services with Zypper (mostly suse)
#
#
echo $(zypper lr -u -E | cut -d'|' -f 1 | grep -E '^[0-9]')
# simpler command which works only on SLES11 SP3 or newer:
# echo $(zypper lr -u -E | cut -d'|' -f 1 | grep -E '^[0-9]')
# on older systems, zypper doesn't know the parameter -E
echo $(zypper lr -u | grep -E '^([^|]+\|){3,3} Yes' | cut -d'|' -f 1 | grep -E '^[0-9]')

@ -25,4 +25,6 @@ if [ -f "$__object/parameter/service_uri" ]; then
else
uri="/$__object_id"
fi
echo $(zypper ls -u -E | grep -E "\<$uri\>" | cut -d'|' -f 1 )
# simpler command which works only on SLES11 SP3 or newer:
# echo $(zypper ls -u -E | grep -E "\<$uri\>" | cut -d'|' -f 1 )
echo $(zypper ls -u | grep -E '^([^|]+\|){3,3} Yes' | grep -E "\<$uri\>" | cut -d'|' -f 1 )

@ -20,4 +20,6 @@
#
# Manage services with Zypper (mostly suse)
#
echo $(zypper ls -u -E | cut -d'|' -f 1 | grep -E '^[0-9]')
# simpler command which works only on SLES11 SP3 or newer:
# echo $(zypper ls -u -E | cut -d'|' -f 1 | grep -E '^[0-9]')
echo $(zypper ls -u | grep -E '^([^|]+\|){3,3} Yes' | cut -d'|' -f 1 | grep -E '^[0-9]')

@ -25,4 +25,6 @@ if [ -f "$__object/parameter/service_uri" ]; then
else
uri="/$__object_id"
fi
echo $(zypper ls -u -E | grep -E "\<$uri\>" | cut -d'|' -f 7 )
# simpler command which works only on SLES11 SP3 or newer:
# echo $(zypper ls -u -E | grep -E "\<$uri\>" | cut -d'|' -f 7)
echo $(zypper ls -u | grep -E '^([^|]+\|){3,3} Yes' | grep -E "\<$uri\>" | cut -d'|' -f 7 )

Loading…
Cancel
Save