summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-10-11Change how config file errors are reportedHEADmasterDavid Zeuthen14-375/+875
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-09Nuke stc_monitor_new_with_config_dir() - use STC_CONFIG_DIR envvar insteadDavid Zeuthen5-89/+33
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-09Explicitly mention that if LuksPassphrase is absent, the user is asked for itDavid Zeuthen1-2/+6
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-08Move daemon binary to /lib/stc-1/stcdDavid Zeuthen2-2/+2
Actually, $prefix/lib/stc-1/stcd but the whole stc tarball is supposed to be built with prefix=/ so it works before /usr is mounted and in the initramfs. (No, we can't use $libdir because that's sometimes /lib64 and we want the stcd binary to be at a predictable location (basically same reasons udev uses /lib/udev even on 64-bit systems.)) (Btw, we actually need libgudev1 moved from /usr/lib64 to /lib64 (on Fedora at least) but that's another story.) Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-08Use item-prefixed options for specifying what device to act onDavid Zeuthen14-183/+192
This makes the configuration files slighty more readable and also cleans up the API somewhat. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-08Drop the --id part 'stc start' and 'stc stop'David Zeuthen4-18/+22
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-08Clarify that only items with Auto=true will be started/stopped by stcd(8)David Zeuthen1-5/+8
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-08Avoid leaking a GUdevDevice when update state for Luks itemsDavid Zeuthen1-1/+1
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-08Add enough infrastructure to make it possible to trace memory leaksDavid Zeuthen4-0/+194
# G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --leak-check=full --show-reachable=yes .libs/lt-stcd Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-08Demote log message from INFO to DEBUGDavid Zeuthen1-2/+2
We don't really want the last two lines of Oct 8 17:08:00 x61 stcd[11538]: stcd 0.1 starting up Oct 8 17:08:00 x61 stcd[11538]: coldplugging items Oct 8 17:08:00 x61 stcd[11538]: done coldplugging items Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-08Mention the Auto option in the stc.conf man pageDavid Zeuthen1-0/+19
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-08Add stcd for automatically starting/stopping storage itemsDavid Zeuthen16-31/+1383
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-08Add state STC_ITEM_STATE_DEFUNCT and show it for supported typesDavid Zeuthen11-203/+435
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-07Make stc(8) print information when starting/stopping itemsDavid Zeuthen8-64/+300
... and also sort out slave_devices, device and mount_paths state variables. # stc start --id sekrit Passphrase needed for item sekrit_Luks of type luks (/dev/sdb2) Passphrase: Item sekrit_Luks has been started (/dev/sdb2 is unlocked as /dev/dm-0). Item sekrit has been started (/dev/dm-0 is mounted at /mnt/sekrit). # stc start --id MyRaid Item MyRaid_Raid has been started (/dev/md127 with components /dev/sdb1, /dev/mmcblk0p1). Item MyRaid has been started (/dev/md127 is mounted at /mnt/MyRaid). # stc stop --id MyRaid Item MyRaid has been stopped (/dev/md127 unmounted). Item MyRaid_Raid has been stopped (components /dev/sdb1, /dev/mmcblk0p1). # stc stop --id sekrit Item sekrit has been stopped (/dev/dm-0 unmounted). Item sekrit_Luks has been stopped (/dev/sdb2 locked). Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-07Move from stc(1) to stc(8)David Zeuthen3-9/+9
Since /usr/sbin/stc really is a system administration command, not a user command. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-07Write man page for stc toolDavid Zeuthen2-21/+202
... and rearrange the man page for stc.conf a bit. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-07Rework how options workDavid Zeuthen11-153/+147
In particular, drop the Options key and just include all keys that are prefixed with the name of the item type. This means that e.g. Options=Filesystem:mount_path=/media/My Photos;Filesystem:options=umask=0022,notime becomes FilesystemMountPath=/media/My Photos FilesystemOptions=umask=0022,noatime which is a lot easier to read. Also rename LUKS -> Luks MDRaid -> Raid NickName -> Comment Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-07Rename NickName to CommentDavid Zeuthen8-41/+41
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-06Forgot to add fileDavid Zeuthen1-0/+29
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-06Add a stc.conf(5) man pageDavid Zeuthen4-0/+293
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-06Add LUKS:mapping_name option to specify the name of the created DM deviceDavid Zeuthen1-2/+7
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-06Handle multiple mount pointsDavid Zeuthen5-49/+73
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-06Handle error paths correctlyDavid Zeuthen1-8/+16
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-06Don't complete --allow-degraded for the stop verb in stc(1)David Zeuthen1-1/+1
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-06Check if device is already ounted before mounting itDavid Zeuthen1-4/+21
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-06Add --allow-degraded option to stc(1)'s start verbDavid Zeuthen1-4/+29
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-06Nuke can-start-dependencies; use can-start and can-start-degraded insteadDavid Zeuthen3-8/+9
This is much nicer since it conveys that the items with deps also get can-start-degraded, e.g. MyRaid_RAID: Type: md-raid Target: UUID=a4a5646e:933c7856:23bfc059:6e17b7ec State: can-start-degraded Slave Devices: /dev/sdb1 MyRaid: Type: filesystem Target: UUID=a6f27fe4-97c4-433d-ae52-f2f97939514e Options: Filesystem:mount_path=/mnt/MyRaid Filesystem:options=defaults Dependencies: MyRaid_RAID State: can-start-degraded instead of can-start-dependencies. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-06UpdatesDavid Zeuthen18-203/+2443
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-05Don't use flags for StcItemStateDavid Zeuthen4-106/+42
All the possible flags were actually mutually exclusive already. So better just use a normal enumeration. Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-05Determine whether a configuration is currently or can be appliedDavid Zeuthen13-23/+1431
http://people.freedesktop.org/~david/stc-list.png Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-05Use proper sort orderDavid Zeuthen3-6/+7
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-04Add semantic checksDavid Zeuthen9-15/+148
For example, reject MDRaid items with Device=/dev/blah and Filesystem items without a Filesystem:mount_path=/where_to_mount Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-04Implement Depends, 'list' verb in stc(1) and add default stc.conf fileDavid Zeuthen13-79/+455
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-10-04Monitor configuration files and emit added, remove and changed signalsDavid Zeuthen9-47/+645
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-09-30UpdatesDavid Zeuthen1-0/+5
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-09-30UpdatesDavid Zeuthen12-157/+309
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-09-29UpdatesDavid Zeuthen11-34/+765
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-09-28Don't include stc_item_type_get_type in the docsDavid Zeuthen1-1/+1
Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-09-28Initial commitDavid Zeuthen25-0/+1960
Signed-off-by: David Zeuthen <davidz@redhat.com>