0.1.6
by Colin Watson, Updated translations
* Add a partman-command script, allowing developers to run a single |
1 |
#! /bin/sh
|
2 |
# This script is intended for developer debugging purposes only. If you use
|
|
3 |
# it for anything else, on your own head be it ...
|
|
4 |
||
5 |
export DEBIAN_FRONTEND=noninteractive |
|
6 |
||
7 |
. /lib/partman/lib/base.sh |
|
8 |
||
0.2.2
by Christian Perrier, Colin Watson, Aurelien Jarno, Frans Pop, Updated translations
[ Colin Watson ] |
9 |
if [ "${1#/dev/}" != "$1" ]; then |
0.1.6
by Colin Watson, Updated translations
* Add a partman-command script, allowing developers to run a single |
10 |
dirname="$(echo "$1" | sed 's:/:=:g')" |
11 |
cd "$DEVICES/$dirname" || exit $? |
|
12 |
shift
|
|
13 |
else
|
|
14 |
dir="$(pwd)" |
|
15 |
case $dir in |
|
16 |
$DEVICES/*) |
|
17 |
;;
|
|
18 |
*)
|
|
19 |
echo "Must be run from a subdirectory of $DEVICES" >&2 |
|
20 |
exit 1 |
|
21 |
esac
|
|
22 |
fi
|
|
23 |
||
24 |
# Within each group, please keep commands in the same order as in
|
|
25 |
# parted_server.c:main_loop().
|
|
26 |
case $1 in |
|
82
by Colin Watson
* Apply optimal alignment constraints to new partitions, or when |
27 |
OPEN|OPENED|VIRTUAL|IS_CHANGED|PARTITION_INFO|GET_CHS|USES_NAMES|GET_MAX_PRIMARY|USES_EXTENDED|GET_FILE_SYSTEM|CHECK_FILE_SYSTEM|CREATE_FILE_SYSTEM|NEW_PARTITION|RESIZE_PARTITION|GET_RESIZE_RANGE|VIRTUAL_RESIZE_PARTITION|GET_VIRTUAL_RESIZE_RANGE|GET_LABEL_TYPE|IS_BUSY|ALIGNMENT_OFFSET) |
0.1.6
by Colin Watson, Updated translations
* Add a partman-command script, allowing developers to run a single |
28 |
mode=line |
29 |
;;
|
|
30 |
PARTITIONS|LABEL_TYPES|VALID_FLAGS|GET_FLAGS|FILE_SYSTEM_TYPES) |
|
31 |
mode=paragraph |
|
32 |
;;
|
|
33 |
CLOSE|DISK_UNCHANGED|DUMP|COMMIT|UNDO|SET_FLAGS|SET_NAME|CHANGE_FILE_SYSTEM|NEW_LABEL|DELETE_PARTITION|COPY_PARTITION) |
|
34 |
mode=silent |
|
35 |
;;
|
|
36 |
*)
|
|
37 |
echo "Unrecognised command: $1" >&2 |
|
38 |
exit 1 |
|
39 |
;;
|
|
40 |
esac
|
|
41 |
||
42 |
open_dialog "$@" |
|
43 |
case $mode in |
|
44 |
line)
|
|
45 |
read_line response |
|
46 |
echo "$response" |
|
47 |
;;
|
|
48 |
paragraph)
|
|
49 |
read_paragraph |
|
50 |
;;
|
|
51 |
esac
|
|
52 |
close_dialog |
|
53 |
||
54 |
exit 0 |