Skip to content
Snippets Groups Projects
Commit e1bc04a0 authored by Jörg Sachse's avatar Jörg Sachse
Browse files

refactor: remove partitioning task, as it was only necessary for METS-based SubApp

parent fcce8fd0
No related branches found
No related tags found
1 merge request!1ND-1759
#!/usr/bin/env bash
set -e
apt-get -y install e2fsprogs parted apt-file
# only create partition on second disk if it doesn't exist already
# alternatively use condition: if [[ ! $( ls -l /dev/disk/by-label | grep "SUBAPP" ) ]]; then
if ( [[ ! $( lsblk -o label | grep "SUBAPP" ) ]] && \
[[ ! $( mount | grep "/dev/sdb" ) ]] && \
[[ ! $( fdisk -l | grep "/dev/sdb[0-9]" ) ]] ); then
echo "partition 'SUBAPP' doesn't exist yet, creating it now."
parted --script /dev/sdb \
mklabel msdos \
mkpart primary ext4 1MiB 100MiB
[[ $? -eq 0 ]] && echo "Partition created." || exit 1
mkfs.ext4 /dev/sdb1
[[ $? -eq 0 ]] && echo "Partition formatted." || exit 1
e2label /dev/sdb1 SUBAPP
[[ $? -eq 0 ]] && echo "Label assigned." || exit 1
else
echo "partition 'SUBAPP' already exists, doing nothing."
fi
...@@ -26,10 +26,6 @@ ...@@ -26,10 +26,6 @@
import_tasks: configure_kernel_parameters.yml import_tasks: configure_kernel_parameters.yml
tags: [subapp] tags: [subapp]
- name: Partition anlegen und formatieren, falls nötig
script: create_partition.sh
tags: [subapp]
# - name: Xalan-Bibliotheken laden # - name: Xalan-Bibliotheken laden
# command: ldconfig -v /usr/local/lib/ # noqa 301 # command: ldconfig -v /usr/local/lib/ # noqa 301
# tags: [subapp] # tags: [subapp]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment