Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #83 from downneck/master

fixes #54
  • Loading branch information...
commit fda9f6318a2508a07834235ef32fe2a0952e8f79 2 parents d377004 + 1a72ea0
@flexiondotorg authored
Showing with 10 additions and 4 deletions.
  1. +10 −4 oab-java.sh
View
14 oab-java.sh
@@ -11,6 +11,12 @@
# Version
VER="0.2.6"
+# check the --fqdn version, if it's absent fall back to hostname
+HOSTNAME=$(hostname --fqdn 2>/dev/null)
+if [[ $HOSTNAME == "" ]]; then
+ HOSTNAME=$(hostname)
+fi
+
# common ############################################################### START #
sp="/-\|"
log="${PWD}/`basename ${0}`.log"
@@ -592,7 +598,7 @@ cecho success
# Create a 'Release' file
ncecho " [x] Creating Release file "
cd ${WORK_PATH}/deb
-echo "Origin: `hostname --fqdn`" > Release
+echo "Origin: ${HOSTNAME}" > Release
echo "Label: Java" >> Release
echo "Suite: ${LSB_CODE}" >> Release
echo "Version: ${LSB_REL}" >> Release
@@ -619,8 +625,8 @@ if [[ `imvirt` != "OpenVZ" ]]; then
echo "Key-Length: 1024" >> ${WORK_PATH}/gpg-key.conf
echo "Subkey-Type: ELG-E" >> ${WORK_PATH}/gpg-key.conf
echo "Subkey-Length: 2048" >> ${WORK_PATH}/gpg-key.conf
- echo "Name-Real: `hostname --fqdn`" >> ${WORK_PATH}/gpg-key.conf
- echo "Name-Email: root@`hostname --fqdn`" >> ${WORK_PATH}/gpg-key.conf
+ echo "Name-Real: ${HOSTNAME}" >> ${WORK_PATH}/gpg-key.conf
+ echo "Name-Email: root@${HOSTNAME}" >> ${WORK_PATH}/gpg-key.conf
echo "Expire-Date: 0" >> ${WORK_PATH}/gpg-key.conf
cecho success
@@ -661,7 +667,7 @@ if [ -n "${BUILD_KEY}" ] || [ -e ${WORK_PATH}/gpg/pubring.gpg ] && [ -e ${WORK_P
if [ -z "${BUILD_KEY}" ] ; then
# Export public signing key
ncecho " [x] Exporting public key "
- gpg --homedir ${WORK_PATH}/gpg --export -a "`hostname --fqdn`" > ${WORK_PATH}/deb/pubkey.asc
+ gpg --homedir ${WORK_PATH}/gpg --export -a "${HOSTNAME}" > ${WORK_PATH}/deb/pubkey.asc
cecho success
# Add the public signing key
Please sign in to comment.
Something went wrong with that request. Please try again.