diff options
| author | Jonathan Bauer | 2013-08-22 13:43:19 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2013-08-22 13:43:19 +0200 |
| commit | d45015d422fe39de6c634b89405efef7e861d07a (patch) | |
| tree | 45f9b0536900e0e4c742d38ea923975048432839 /remote/setup_target | |
| parent | fix /etc/functions.inc sourcing (diff) | |
| parent | [rootfs-stage31] Make download timeouts shorter, properly use drop_shell in t... (diff) | |
| download | tm-scripts-d45015d422fe39de6c634b89405efef7e861d07a.tar.gz tm-scripts-d45015d422fe39de6c634b89405efef7e861d07a.tar.xz tm-scripts-d45015d422fe39de6c634b89405efef7e861d07a.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/setup_target')
| -rwxr-xr-x | remote/setup_target | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/remote/setup_target b/remote/setup_target index 60cf23b5..c19113df 100755 --- a/remote/setup_target +++ b/remote/setup_target @@ -65,19 +65,23 @@ initial_checks () { case "$SYS_DISTRIBUTION" in ubuntu|debian) PACKET_MANAGER="apt" + PACKET_HANDLER="dpkg" ;; opensuse) PACKET_MANAGER="zypper" + PACKET_HANDLER="rpm" ;; scientific) PACKET_MANAGER="yum" + PACKET_HANDLER="rpm" ;; *) perror "Unknown Distribution: $SYS_DISTRIBUTION - Please specify its packet manager in remote/setup_target" ;; esac # Get version - we mangle this quite a bit. first make sure it has no spaces, then split version at period (.), underscore (_) and dash (-) - local VERSION=$(lsb_release -rs | tolower | sed -r 's/\s//g;s/[\._]/ /g;s/-//g') + SYS_VERSION=$(lsb_release -rs | tolower) + local VERSION=$(echo $SYS_VERSION | sed -r 's/\s//g;s/[\._]/ /g;s/-//g') local STRTMP="" PRINT_SYS_VERSIONS="*.conf.$SYS_DISTRIBUTION" SYS_VERSIONS="$SYS_DISTRIBUTION" @@ -362,6 +366,10 @@ process_module() { copy_static_data pinfo "## Post copy" post_copy + # Sanity checks + [ -e "$TARGET_BUILD_DIR/var/run" -a ! -L "$TARGET_BUILD_DIR/var/run" ] && perror "Messup datected: $TARGET_BUILD_DIR/var/run exists and is not a symlink!" + [ -e "$TARGET_BUILD_DIR/var/lock" -a ! -L "$TARGET_BUILD_DIR/var/lock" ] && perror "Messup datected: $TARGET_BUILD_DIR/var/lock exists and is not a symlink!" + [ -n "$(ls -A "$TARGET_BUILD_DIR/run")" ] && perror "Messup detected: $TARGET_BUILD_DIR/run is not empty. You cannot place static files there, use /etc/tmpfiles.d instead!" # set MODULE_BUILD_SIZE calc_size pinfo "Module completed. Total size: ${MODULE_BUILD_SIZE}" |
