forked from ungleich-public/cdist
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
This commit is contained in:
parent
f165b5611e
commit
aec1632627
5 changed files with 16 additions and 5 deletions
|
@ -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…
Reference in a new issue