diff options
| author | Simon Rettberg | 2013-02-21 22:24:35 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2013-02-21 22:24:35 +0100 |
| commit | 9804c991491e7f2ea9da3b4c9210595a3d336dfd (patch) | |
| tree | a060a1f8bc2b7bb953b4182181caceb1f928f0c7 /remote/tools/systemd | |
| parent | Merge branch 'master' of ssh://openslx/openslx-ng/tm-scripts (diff) | |
| download | tm-scripts-9804c991491e7f2ea9da3b4c9210595a3d336dfd.tar.gz tm-scripts-9804c991491e7f2ea9da3b4c9210595a3d336dfd.tar.xz tm-scripts-9804c991491e7f2ea9da3b4c9210595a3d336dfd.zip | |
1. New logging/output system - use functions provided by helper/logging.inc
2. Update modules to use new logging system - already updated policykit and systemd as an example
3. Stop all processing if a critical error occurs (use perror to notify user)
4. Some minor tweaks and fixes to setup_tools (added more error checking, but still incomplete)
Diffstat (limited to 'remote/tools/systemd')
| -rw-r--r-- | remote/tools/systemd/systemd.build | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/remote/tools/systemd/systemd.build b/remote/tools/systemd/systemd.build index c5a9a86c..7d9588c0 100644 --- a/remote/tools/systemd/systemd.build +++ b/remote/tools/systemd/systemd.build @@ -1,13 +1,8 @@ #tool/distro specific functions for fetching, building and installing dependencies fetch_source () { - if [ ! -e .fetched_source ]; then - [ ! -d src ] && mkdir src - wget $URL - tar xJf $VERSION.tar.xz -C src/ - rm $VERSION.tar.xz - touch .fetched_source - fi + [ ! -e .fetched_source ] && download_untar "$URL" "src/" + touch .fetched_source } install_dependencies() { @@ -20,6 +15,7 @@ install_dependencies() { # apt-get update --force-yes #fi # install libkmod from source + # TODO: Use download_untar local libkmodversion=kmod-12 if [ ! -d $libkmodversion ]; then wget http://www.kernel.org/pub/linux/utils/kernel/kmod/${libkmodversion}.tar.gz @@ -32,24 +28,27 @@ install_dependencies() { cd - fi - apt-get install -y $DEPS &>/dev/null + apt-get install -y $DEPS } build () { if [ ! -e .built ]; then - cd src/$VERSION - ./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" - make -j5 - [ ! -d $TOOL_DIR/$TOOL/build ] && mkdir -p $TOOL_DIR/$TOOL/build - DESTDIR=$TOOL_DIR/$TOOL/build make install + cd "src/$VERSION/" + pinfo "calling configure" + ./configure --disable-manpages --enable-split-usr --sysconfdir="/etc" --enable-gtk-doc-html=no || perror "configure failed." + pinfo "calling make" + make -j5 || perror "make failed." + mkdir -p $TOOL_DIR/$TOOL/build + pinfo "calling make install" + DESTDIR=$TOOL_DIR/$TOOL/build make install || perror "make install failed." cd - - touch .built + touch .built fi } post_copy() { # copy static data files - cp -r $TOOL_DIR/$TOOL/data/* $INIT_DIR + cp -r $TOOL_DIR/$TOOL/data/* $INIT_DIR || perror "copying data files failed." # dont clear systemd log at startup sed -i.bak "s/TTYVTDisallocate=yes/TTYVTDisallocate=no/g" $INIT_DIR/usr/lib/systemd/system/getty@.service @@ -61,5 +60,6 @@ post_copy() { fi # add nfs to modules-load list - echo "nfs" > $INIT_DIR/etc/modules-load.d/nfs.conf + echo "nfs" > "$INIT_DIR/etc/modules-load.d/nfs.conf" } + |
