[Xorp-hackers] [PATCH 1/1] xorp_install.bash fix

Igor Maravic igorm at etf.rs
Tue Sep 27 04:29:58 PDT 2011


Signed-off-by: Igor Maravic <igorm at etf.rs>
---
:100644 100644 cf23c47... e1d52bb... M	xorp/xorp_install.bash
 xorp/xorp_install.bash |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/xorp/xorp_install.bash b/xorp/xorp_install.bash
index cf23c47..e1d52bb 100644
--- a/xorp/xorp_install.bash
+++ b/xorp/xorp_install.bash
@@ -18,8 +18,21 @@ if [ `pwd` != "/usr/local/xorp" ]
 fi
 
 # Add xorp user and group
+
+#Check for adduser commands
+adduserArgs=""
+if adduser -h | grep ".--system" > /dev/null 2>&1
+then
+        adduserArgs="$adduserArgs --system"
+fi
+
+if adduser -h | grep ".--no-create-home" > /dev/null 2>&1
+then
+        adduserArgs="$adduserArgs --no-create-home"
+fi
+
 echo "Creating xorp user and adding xorp to xorp and root groups..."
-adduser xorp
+adduser $adduserArgs xorp
 usermod -a -G xorp xorp
 usermod -a -G xorp root
 usermod -a -G xorp lanforge
-- 
1.7.4.1



More information about the Xorp-hackers mailing list