X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage3%2Fcis-getdate;h=0c7bebb838dbc9ebe0b16a97b25e8f5cbe4fd074;hb=5f02c8c4b5fe6640bcdb61d1006256289a57c222;hp=6a9651662e45bdf1b85733ebff88faf951df90a8;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage3/cis-getdate b/stage3/cis-getdate index 6a96516..0c7bebb 100755 --- a/stage3/cis-getdate +++ b/stage3/cis-getdate @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,14 +9,14 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && +apply_patches ${1} -cd ${LFS_TMP}/${1} && -make && -make install && -make installman && +cd ${LFS_TMP}/${1} +make +make install +make installman -cat > /usr/local/bin/hvgetdate << EOF && +cat > /usr/local/bin/hvgetdate << EOF #!/bin/sh # Time server informations: @@ -40,13 +42,12 @@ echo -n "Synchronizing kernel time via NTP server:" getdate -adjust 1 600 \${NTP_HOST1} \${NTP_HOST2} exit 0 EOF -chmod 740 /usr/local/bin/hvgetdate && +chmod 740 /usr/local/bin/hvgetdate # Adding fcron entry string_add "# Run after five minutes of execution the first time, then run every hours" \ - /etc/fcron/fcrontab && + /etc/fcron/fcrontab string_add "@mail(false),first(5) 6h /usr/local/bin/hvgetdate" \ /etc/fcron/fcrontab -# Return last error exit $?