File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,16 +107,17 @@ function configure_swift() {
107107 if [[ -e ${SWIFT_DATA_DIR}/drives/images/swift.img ]]; then
108108 if egrep -q ${SWIFT_DATA_DIR}/drives/sdb1 /proc/mounts; then
109109 sudo umount ${SWIFT_DATA_DIR}/drives/sdb1
110+ sudo rm -f ${SWIFT_DATA_DIR}/drives/images/swift.img
110111 fi
111- else
112- mkdir -p ${SWIFT_DATA_DIR}/drives/images
113- sudo touch ${SWIFT_DATA_DIR}/drives/images/swift.img
114- sudo chown $USER: ${SWIFT_DATA_DIR}/drives/images/swift.img
115-
116- dd if=/dev/zero of=${SWIFT_DATA_DIR}/drives/images/swift.img \
117- bs=1024 count=0 seek=${SWIFT_LOOPBACK_DISK_SIZE}
118112 fi
119113
114+ mkdir -p ${SWIFT_DATA_DIR}/drives/images
115+ sudo touch ${SWIFT_DATA_DIR}/drives/images/swift.img
116+ sudo chown $USER: ${SWIFT_DATA_DIR}/drives/images/swift.img
117+
118+ dd if=/dev/zero of=${SWIFT_DATA_DIR}/drives/images/swift.img \
119+ bs=1024 count=0 seek=${SWIFT_LOOPBACK_DISK_SIZE}
120+
120121 # Make a fresh XFS filesystem
121122 mkfs.xfs -f -i size=1024 ${SWIFT_DATA_DIR}/drives/images/swift.img
122123
Original file line number Diff line number Diff line change 6565# Swift runs daemons
6666if is_service_enabled swift; then
6767 stop_swift
68+ cleanup_swift
6869fi
6970
7071# Apache has the WSGI processes
You can’t perform that action at this time.
0 commit comments