Merge remote-tracking branch 'dheule/bugfix_zypper_types_on_older_suse_relases'

This commit is contained in:
Nico Schottelius 2013-12-20 08:55:42 +01:00
commit ee25229a48
7 changed files with 19 additions and 8 deletions

View file

@ -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)

View file

@ -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]')

View file

@ -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 )

View file

@ -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]')

View file

@ -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 )

View file

@ -33,7 +33,7 @@ type::
BOOLEAN PARAMETERS
------------------
remove-all-other-service::
remove-all-other-services::
Drop all other services found on the target host before adding the new one.
remove-all-repos::
@ -45,7 +45,7 @@ EXAMPLES
--------------------------------------------------------------------------------
# Ensure that internal SLES11 SP3 RIS is in installed and all other services and repos are discarded
__zypper_service INTERNAL_SLES11_SP3 --service_desc "Internal SLES11 SP3 RIS" --service_uri "http://path/to/your/ris/dir" --remove-all-other-service --remove-all-repos
__zypper_service INTERNAL_SLES11_SP3 --service_desc "Internal SLES11 SP3 RIS" --service_uri "http://path/to/your/ris/dir" --remove-all-other-services --remove-all-repos
# Ensure that internal SLES11 SP3 RIS is in installed, no changes to ohter services or repos
__zypper_service INTERNAL_SLES11_SP3 --service_desc "Internal SLES11 SP3 RIS" --service_uri "http://path/to/your/ris/dir"

View file

@ -1,2 +1,2 @@
remove-all-other-service
remove-all-other-services
remove-all-repos