diff options
author | Chris Severance | 2016-02-12 15:19:29 -0500 |
---|---|---|
committer | Chris Severance | 2016-02-12 15:19:29 -0500 |
commit | 602881398be6d8dae8f7c478ab7142539619c83a (patch) | |
tree | e5d1c3c66c1a48e1c5eee18835611e80b7c3ca9c /hadoop.install | |
parent | b7bc571827d193f6d8f93d4ba056bf609ce28790 (diff) | |
download | aur-602881398be6d8dae8f7c478ab7142539619c83a.tar.gz |
Update to 2.7.2
Diffstat (limited to 'hadoop.install')
-rw-r--r-- | hadoop.install | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/hadoop.install b/hadoop.install index 48536c51c471..a7b1b075ec42 100644 --- a/hadoop.install +++ b/hadoop.install @@ -1,34 +1,32 @@ post_install() { - getent group hadoop &>/dev/null || groupadd -r hadoop >/dev/null - getent passwd hadoop &>/dev/null || useradd -r -g hadoop -d /etc/hadoop hadoop >/dev/null + getent group 'hadoop' >/dev/null 2>&1 || groupadd -r 'hadoop' >/dev/null + getent passwd 'hadoop' /dev/null 2>&1 || useradd -r -g 'hadoop' -d '/etc/hadoop' 'hadoop' >/dev/null - if [ ! -d /etc/hadoop/.ssh ] ; then - mkdir -p /etc/hadoop/.ssh + if [ ! -d '/etc/hadoop/.ssh' ] ; then + mkdir -p '/etc/hadoop/.ssh' fi - chown -R hadoop:hadoop /etc/hadoop + chown -R 'hadoop:hadoop' '/etc/hadoop' - if [ ! -e /etc/hadoop/.ssh/id_rsa ] ; then - su -s /bin/bash -c "ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa" - hadoop - su -s /bin/bash -c "cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys" - hadoop + if [ ! -e '/etc/hadoop/.ssh/id_rsa' ] ; then + su -s '/usr/bin/bash' -c "ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa" - 'hadoop' + su -s '/usr/bin/bash' -c "cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys" - 'hadoop' fi - echo "An SSH key-pair has been created. Depending on your SSHD configuration you may" - echo "need to connect to localhost as user 'hadoop' to make sure Hadoop can connect." - echo "" - echo "$ ssh localhost" + echo 'An SSH key-pair has been created. Depending on your SSHD configuration you may' + echo 'need to connect to localhost as user "hadoop" to make sure Hadoop can connect.' + echo '' + echo '$ ssh localhost' - echo "" - echo "===> Read https://wiki.archlinux.org/index.php/Hadoop for more information" - true + echo '' + echo '===> Read https://wiki.archlinux.org/index.php/Hadoop for more information' } post_upgrade() { - true + : } post_remove() { - getent passwd hadoop &>/dev/null && userdel hadoop >/dev/null - getent group hadoop &>/dev/null && groupdel hadoop >/dev/null - true + getent passwd 'hadoop' >/dev/null 2>&1 && userdel 'hadoop' >/dev/null + getent group 'hadoop' >/dev/null 2>&1 && groupdel 'hadoop' >/dev/null } |