File: initial_auto_raid

package info (click to toggle)
partman-auto-raid 21
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 376 kB
  • sloc: sh: 235; makefile: 2
file content (35 lines) | stat: -rwxr-xr-x 758 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

# parts based on initial_auto from partman_auto
# parts based on partman-md's do_option for choose_partition

. /lib/partman/lib/base.sh
. /lib/partman/lib/commit.sh

# See if we are supposed to run and only run once
db_get partman-auto/method
if [ "$RET" != raid ] || \
   [ -f /var/lib/partman/initial_auto_raid ]; then
	exit 0
fi

mkdir -p /var/lib/partman
touch /var/lib/partman/initial_auto_raid

confirm_changes partman-md || exit 1

commit_changes partman/text/commit_failed || exit $?

stop_parted_server

RET=""
auto-raidcfg || RET=$?
if [ "$RET" ] && [ "$RET" -ne 9 ]; then
	db_set partman-auto-raid/error false
	db_input critical partman-auto-raid/error
	db_go
	exit 1
fi
touch /var/lib/partman/do_initial_auto_raid_fs

restart_partman