Skip to content

Commit

Permalink
refactor(init/hive): use sed to replace tail -f command
Browse files Browse the repository at this point in the history
  • Loading branch information
unknowntpo committed Dec 11, 2024
1 parent ed6c5b5 commit 1b20f74
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions init/hive/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
# under the License.
#

# remove command line `tail -f /dev/null` in the `/usr/local/sbin/start.sh`, so we can run subsequent commands
if [[ $(tail -n 1 /usr/local/sbin/start.sh) == 'tail -f /dev/null' ]]; then
sed -i '$d' /usr/local/sbin/start.sh
fi
# remove command `tail -f /dev/null` in `/usr/local/sbin/start.sh`, so we can run subsequent commands
sed -i -E 's/tail -f \/dev\/null//g' /usr/local/sbin/start.sh

cp /tmp/hive/core-site.xml /tmp/hadoop-conf
/bin/bash /usr/local/sbin/start.sh
hdfs dfs -mkdir -p /user/gravitino
Expand Down

0 comments on commit 1b20f74

Please sign in to comment.