2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Add simple arg parsing for mkpkg so we can set debug, flavor or platform.

This commit is contained in:
Todd C. Miller
2010-07-26 11:15:50 -04:00
parent d02489ff40
commit 551791a51f
3 changed files with 45 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
%set
if test -n "$SUDO_FLAVOR"; then
name="sudo-$SUDO_FLAVOR"
if test -n "$flavor"; then
name="sudo-$flavor"
else
name="sudo"
fi
@@ -183,7 +183,7 @@ still allow people to get their work done."
# create symlink to ease transition to new path for ldap config
# if old config file exists and new one doesn't
if test X"%{SUDO_FLAVOR}" = X"ldap" -a \
if test X"%{flavor}" = X"ldap" -a \
-r /etc/ldap/ldap.conf -a ! -r /etc/sudo-ldap.conf; then
ln -s /etc/ldap/ldap.conf /etc/sudo-ldap.conf
fi
@@ -213,7 +213,7 @@ still allow people to get their work done."
%preun [deb]
# Remove the /etc/ldap/ldap.conf -> /etc/sudo-ldap.conf symlink if
# it matches what we created in the postinstall script.
if test X"%{SUDO_FLAVOR}" = X"ldap" -a \
if test X"%{flavor}" = X"ldap" -a \
X"`readlink /etc/sudo-ldap.conf 2>/dev/null`" = X"/etc/ldap/ldap.conf"; then
rm -f /etc/sudo-ldap.conf
fi