| 1 | # Copyright (c) 2008, Christopher Cowart and contributors |
|---|
| 2 | # All rights reserved. |
|---|
| 3 | # |
|---|
| 4 | # Redistribution and use in source and binary forms, with or without |
|---|
| 5 | # modification, are permitted provided that the following conditions |
|---|
| 6 | # are met: |
|---|
| 7 | # * Redistributions of source code must retain the above copyright |
|---|
| 8 | # notice, this list of conditions and the following disclaimer. |
|---|
| 9 | # * Redistributions in binary form must reproduce the above copyright |
|---|
| 10 | # notice, this list of conditions and the following disclaimer in the |
|---|
| 11 | # documentation and/or other materials provided with the distribution. |
|---|
| 12 | # |
|---|
| 13 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|---|
| 14 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|---|
| 15 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
|---|
| 16 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
|---|
| 17 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|---|
| 18 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED |
|---|
| 19 | # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
|---|
| 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
|---|
| 21 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
|---|
| 22 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
|---|
| 23 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|---|
| 24 | # |
|---|
| 25 | # $Id$ |
|---|
| 26 | # |
|---|
| 27 | # This is a confman shell library that provides usage and help information. |
|---|
| 28 | # I wanted to get it out of the main script, cause it's really long. This also |
|---|
| 29 | # makes modularizing the code (think foreign languages) in the future. |
|---|
| 30 | |
|---|
| 31 | function print_usage { |
|---|
| 32 | cat <<EOF |
|---|
| 33 | $MYNAME manages configuration files |
|---|
| 34 | |
|---|
| 35 | Usage: |
|---|
| 36 | $MYNAME [ help | -h ] [ command ] |
|---|
| 37 | $MYNAME setup |
|---|
| 38 | $MYNAME update [ -a ] [ -r revision_string ] [ recipe ] |
|---|
| 39 | $MYNAME commit |
|---|
| 40 | $MYNAME diff [ working_copy ] |
|---|
| 41 | $MYNAME audit |
|---|
| 42 | $MYNAME log [ working_copy ] |
|---|
| 43 | $MYNAME create module [ module ... ] |
|---|
| 44 | $MYNAME rmmod module [ module ... ] |
|---|
| 45 | $MYNAME rename oldmodule newmodule |
|---|
| 46 | $MYNAME import module livefile |
|---|
| 47 | $MYNAME install workingfile [ workingfile ... ] |
|---|
| 48 | $MYNAME status [ working_copy ] |
|---|
| 49 | $MYNAME state |
|---|
| 50 | $MYNAME ls [ workingfile | workingdirectory ] |
|---|
| 51 | $MYNAME lsattr [ workingfile | workingdirectory ] |
|---|
| 52 | $MYNAME chattr attribute value [ workingfile | workingdirectory ] |
|---|
| 53 | $MYNAME recipe [ get | list ] |
|---|
| 54 | $MYNAME recipe [ create | edit | print | remove | set ] recipe_name |
|---|
| 55 | $MYNAME rmattr attribute [ workingfile | workingdirectory ] |
|---|
| 56 | $MYNAME rm workingfile |
|---|
| 57 | $MYNAME cp src_working_copy dest_working_copy |
|---|
| 58 | $MYNAME mv src_working_copy dest_working_copy |
|---|
| 59 | $MYNAME mkdir workingdirectory |
|---|
| 60 | $MYNAME touch workingfile |
|---|
| 61 | $MYNAME revert workingfile |
|---|
| 62 | $MYNAME chown owner [ workingfile | workingdirectory ] |
|---|
| 63 | $MYNAME chgrp group [ workingfile | workingdirectory ] |
|---|
| 64 | $MYNAME chmod mode [ workingfile | workingdirectory ] |
|---|
| 65 | $MYNAME chcom comment-character [ workingfile | workingdirectory ] |
|---|
| 66 | $MYNAME chln target link_name |
|---|
| 67 | $MYNAME checklook module |
|---|
| 68 | $MYNAME checknew module name |
|---|
| 69 | $MYNAME checkclear module name |
|---|
| 70 | $MYNAME rollback module [ checkpoint | YYYYMMDD [HHMM] ] |
|---|
| 71 | |
|---|
| 72 | For specific information on a particular $MYNAME subcommand, please run |
|---|
| 73 | $MYNAME help subcommand |
|---|
| 74 | |
|---|
| 75 | eg: $MYNAME help rollback |
|---|
| 76 | |
|---|
| 77 | EOF |
|---|
| 78 | |
|---|
| 79 | conf_cleanExit $1 |
|---|
| 80 | } |
|---|
| 81 | |
|---|
| 82 | function print_help { |
|---|
| 83 | [ -z "$1" ] && print_usage 0 |
|---|
| 84 | |
|---|
| 85 | case $1 in |
|---|
| 86 | se* ) |
|---|
| 87 | cat <<EOF |
|---|
| 88 | $MYNAME manages configuration files |
|---|
| 89 | |
|---|
| 90 | Usage: |
|---|
| 91 | $MYNAME setup |
|---|
| 92 | |
|---|
| 93 | The setup command is intended to be run the first time you use $MYNAME. |
|---|
| 94 | It will generate your working copy. setup takes no additional arguments. |
|---|
| 95 | |
|---|
| 96 | EOF |
|---|
| 97 | ;; |
|---|
| 98 | cr* ) |
|---|
| 99 | cat <<EOF |
|---|
| 100 | $MYNAME manages configuration files |
|---|
| 101 | |
|---|
| 102 | Usage: |
|---|
| 103 | $MYNAME create module [ module ... ] |
|---|
| 104 | |
|---|
| 105 | Creates one or more modules for the module arguments provided. |
|---|
| 106 | New modules will appear in the top-level-directory of your work- |
|---|
| 107 | ing copy. This change will also be committed to the repository |
|---|
| 108 | at the same time. |
|---|
| 109 | |
|---|
| 110 | EOF |
|---|
| 111 | ;; |
|---|
| 112 | rmm* ) |
|---|
| 113 | cat <<EOF |
|---|
| 114 | $MYNAME manages configuration files |
|---|
| 115 | |
|---|
| 116 | Usage: |
|---|
| 117 | $MYNAME rmmod [ module ... ] |
|---|
| 118 | |
|---|
| 119 | Delete the modules corresponding to the specified module argu- |
|---|
| 120 | ments from your working copy. Follow this action with a revert or |
|---|
| 121 | commit operation. |
|---|
| 122 | |
|---|
| 123 | EOF |
|---|
| 124 | ;; |
|---|
| 125 | ren* ) |
|---|
| 126 | cat <<EOF |
|---|
| 127 | $MYNAME manages configuration files |
|---|
| 128 | |
|---|
| 129 | Usage: |
|---|
| 130 | $MYNAME rename oldmodule newmodule |
|---|
| 131 | |
|---|
| 132 | Rename oldmoule to newmodule, updating all singularities, headers, and |
|---|
| 133 | otherwise performing black magic. |
|---|
| 134 | |
|---|
| 135 | EOF |
|---|
| 136 | ;; |
|---|
| 137 | u* ) |
|---|
| 138 | cat <<EOF |
|---|
| 139 | $MYNAME manages configuration files |
|---|
| 140 | |
|---|
| 141 | Usage: |
|---|
| 142 | $MYNAME update [ -a ] [ -r revision_string ] [ recipe ] |
|---|
| 143 | |
|---|
| 144 | With no arguments, the update command will update your entire working copy |
|---|
| 145 | unless the UPDATE_RELEVANT_ONLY flag is set in confman.conf or your |
|---|
| 146 | ~/.confmanrc. With the UPDATE_RELEVANT_ONLY flag, the default behavior of |
|---|
| 147 | the update command is to update all of the files appearing in the current |
|---|
| 148 | host's recipe file. With a recipe argument, the update command will update |
|---|
| 149 | all files in the working copy relevant to the recipe. This command does not |
|---|
| 150 | alter the repository. |
|---|
| 151 | |
|---|
| 152 | If -r is used, confman will retrieve versions of the files indicated by |
|---|
| 153 | the revision string, e.g., -r PREV for the previous working copy. |
|---|
| 154 | |
|---|
| 155 | The -a option will force a full update of all files in your working copy, |
|---|
| 156 | regardless of whether UPDATE_RELEVANT_ONLY is set. Note that before any |
|---|
| 157 | install or commit operation, there is an implicit update that will cause |
|---|
| 158 | the latest repository revision to be reflected in your working copy. |
|---|
| 159 | |
|---|
| 160 | EOF |
|---|
| 161 | ;; |
|---|
| 162 | d* ) |
|---|
| 163 | cat <<EOF |
|---|
| 164 | $MYNAME manages configuration files |
|---|
| 165 | |
|---|
| 166 | Usage: |
|---|
| 167 | $MYNAME diff [ working_copy ] |
|---|
| 168 | |
|---|
| 169 | Look at the changes you've made to your working copy of a file or directory. |
|---|
| 170 | EOF |
|---|
| 171 | ;; |
|---|
| 172 | lo* ) |
|---|
| 173 | cat <<EOF |
|---|
| 174 | $MYNAME manages configuration files |
|---|
| 175 | |
|---|
| 176 | Usage: |
|---|
| 177 | $MYNAME log [ working_copy ] |
|---|
| 178 | |
|---|
| 179 | Look at the log entries for the file or directory specified by working_copy. |
|---|
| 180 | EOF |
|---|
| 181 | ;; |
|---|
| 182 | status ) |
|---|
| 183 | cat <<EOF |
|---|
| 184 | $MYNAME manages configuration files |
|---|
| 185 | |
|---|
| 186 | Usage: |
|---|
| 187 | $MYNAME status [ working_copy ] |
|---|
| 188 | |
|---|
| 189 | Look at the status entries for the file or directory specified by working_copy. |
|---|
| 190 | EOF |
|---|
| 191 | ;; |
|---|
| 192 | state ) |
|---|
| 193 | cat <<EOF |
|---|
| 194 | $MYNAME manages configuration files |
|---|
| 195 | |
|---|
| 196 | Usage: |
|---|
| 197 | $MYNAME state |
|---|
| 198 | |
|---|
| 199 | This command indicates whether the system is "dirty" or "clean." |
|---|
| 200 | |
|---|
| 201 | A dirty system is one that has missed an automated "sync" operation in order |
|---|
| 202 | to preserve changes made by installation operations occuring between the |
|---|
| 203 | repository's export and the system's call to "sync." |
|---|
| 204 | |
|---|
| 205 | Dirty systems may have out-of-date configuration files. Subsquent sync or |
|---|
| 206 | commit operations can bring the sytem up-to-date. |
|---|
| 207 | EOF |
|---|
| 208 | ;; |
|---|
| 209 | cp ) |
|---|
| 210 | cat <<EOF |
|---|
| 211 | $MYNAME manages configuration files |
|---|
| 212 | |
|---|
| 213 | Usage: |
|---|
| 214 | $MYNAME cp src_working_copy dest_working_copy |
|---|
| 215 | |
|---|
| 216 | Copy source to destination. Arguments must be working copies. |
|---|
| 217 | EOF |
|---|
| 218 | ;; |
|---|
| 219 | mv ) |
|---|
| 220 | cat <<EOF |
|---|
| 221 | $MYNAME manages configuration files |
|---|
| 222 | |
|---|
| 223 | Usage: |
|---|
| 224 | $MYNAME mv src_working_copy dest_working_copy |
|---|
| 225 | |
|---|
| 226 | Move source to destination. Arguments must be working copies. |
|---|
| 227 | EOF |
|---|
| 228 | ;; |
|---|
| 229 | co* ) |
|---|
| 230 | cat <<EOF |
|---|
| 231 | $MYNAME manages configuration files |
|---|
| 232 | |
|---|
| 233 | Usage: |
|---|
| 234 | $MYNAME commit [ -F filename | -m message ] |
|---|
| 235 | |
|---|
| 236 | The commit command causes your changes to take effect. This means that |
|---|
| 237 | first, your working copy of all of the modules in the current host's |
|---|
| 238 | recipe will be committed to the repository. This happens after we've run |
|---|
| 239 | a $MYNAME update to prevent out-of-date conflicts. If there are any |
|---|
| 240 | conflicts that require human intervention, the command will fail and exit |
|---|
| 241 | non-zero. |
|---|
| 242 | |
|---|
| 243 | Once $MYNAME is satisfied that all of your changes have been propogated to |
|---|
| 244 | the repository, we will roll-out your working copy to the live filesystem. |
|---|
| 245 | Every module appearing in the host's recipe file will be rolled out IN THE |
|---|
| 246 | ORDER OF APPEARANCE. |
|---|
| 247 | |
|---|
| 248 | If -F or -m are used, the log message will be read from the filename or |
|---|
| 249 | the commandline, respectively, instead of prompting the user. |
|---|
| 250 | |
|---|
| 251 | EOF |
|---|
| 252 | ;; |
|---|
| 253 | im* ) |
|---|
| 254 | cat <<EOF |
|---|
| 255 | $MYNAME manages configuration files |
|---|
| 256 | |
|---|
| 257 | Usage: |
|---|
| 258 | $MYNAME import module livefile |
|---|
| 259 | |
|---|
| 260 | The import subcommand adds the specified file to your working copy of the |
|---|
| 261 | repository. |
|---|
| 262 | |
|---|
| 263 | EOF |
|---|
| 264 | ;; |
|---|
| 265 | in* ) |
|---|
| 266 | cat <<EOF |
|---|
| 267 | $MYNAME manages configuration files |
|---|
| 268 | |
|---|
| 269 | Usage: |
|---|
| 270 | $MYNAME install [-F filename | -m message] workingfile [workingfile [...]] |
|---|
| 271 | |
|---|
| 272 | The install subcommand allows you to roll out a single file from your working |
|---|
| 273 | copy. |
|---|
| 274 | |
|---|
| 275 | If -F or -m are used, the log message will be read from the filename or |
|---|
| 276 | the commandline, respectively, instead of prompting the user. |
|---|
| 277 | |
|---|
| 278 | EOF |
|---|
| 279 | ;; |
|---|
| 280 | rev* ) |
|---|
| 281 | cat <<EOF |
|---|
| 282 | $MYNAME manages configuration files |
|---|
| 283 | |
|---|
| 284 | Usage: |
|---|
| 285 | $MYNAME revert workingfile [ workingfile ... ] |
|---|
| 286 | |
|---|
| 287 | The revert subcommand gives you the opportunity to revert to the file before |
|---|
| 288 | you started making changes to it. |
|---|
| 289 | |
|---|
| 290 | EOF |
|---|
| 291 | ;; |
|---|
| 292 | rm ) |
|---|
| 293 | cat <<EOF |
|---|
| 294 | $MYNAME manages configuration files |
|---|
| 295 | |
|---|
| 296 | Usage: |
|---|
| 297 | $MYNAME rm file |
|---|
| 298 | |
|---|
| 299 | The remove subcommand removes a file from version control It will NOT remove |
|---|
| 300 | the file from the live filesystem. |
|---|
| 301 | |
|---|
| 302 | EOF |
|---|
| 303 | ;; |
|---|
| 304 | mk* ) |
|---|
| 305 | cat <<EOF |
|---|
| 306 | $MYNAME manages configuration files |
|---|
| 307 | |
|---|
| 308 | Usage: |
|---|
| 309 | $MYNAME mkdir directory |
|---|
| 310 | |
|---|
| 311 | This command will create a new version-controlled directory in your working |
|---|
| 312 | copy. Parent directories do not have to exist; they will be created |
|---|
| 313 | automagically. This command only affects your working copy. It does not commit |
|---|
| 314 | the change. |
|---|
| 315 | |
|---|
| 316 | EOF |
|---|
| 317 | ;; |
|---|
| 318 | ls ) |
|---|
| 319 | cat<<EOF |
|---|
| 320 | $MYNAME manages configuration files |
|---|
| 321 | |
|---|
| 322 | Usage: |
|---|
| 323 | $MYNAME ls [ file | directory ] |
|---|
| 324 | |
|---|
| 325 | The ls subcommand lists out the contents, in modified long form, of the |
|---|
| 326 | current working directory. If a file or directory is specified, it will list |
|---|
| 327 | that instead. |
|---|
| 328 | |
|---|
| 329 | EOF |
|---|
| 330 | ;; |
|---|
| 331 | link | ln ) |
|---|
| 332 | cat<<EOF |
|---|
| 333 | $MYNAME manages configuration files |
|---|
| 334 | |
|---|
| 335 | Usage: |
|---|
| 336 | $MYNAME ( link | ln ) [-f] ( file | directory ) ( link_name | directory) |
|---|
| 337 | |
|---|
| 338 | The ln subcommand creates a symlink within the repository. The first |
|---|
| 339 | argument is the target of the link, which can be either a file or a |
|---|
| 340 | directory. The second argument is either the name of a link or the |
|---|
| 341 | directory in which to create a link of the same name as the target. |
|---|
| 342 | The force command causes ln to ignore any files or links already |
|---|
| 343 | present when creating the link. |
|---|
| 344 | EOF |
|---|
| 345 | ;; |
|---|
| 346 | lsattr ) |
|---|
| 347 | cat<<EOF |
|---|
| 348 | $MYNAME manages configuration files |
|---|
| 349 | |
|---|
| 350 | Usage: |
|---|
| 351 | $MYNAME lsattr [ file | directory ] |
|---|
| 352 | |
|---|
| 353 | The lsattr subcommand lists out the confman attributes of files in the |
|---|
| 354 | repository. These attributes can be used to store information such as |
|---|
| 355 | file permissions, ownership, comment characters, syntax checkers, and |
|---|
| 356 | even commands to execute when changing the file. |
|---|
| 357 | |
|---|
| 358 | EOF |
|---|
| 359 | ;; |
|---|
| 360 | chattr ) |
|---|
| 361 | cat<<EOF |
|---|
| 362 | $MYNAME manages configuration files |
|---|
| 363 | |
|---|
| 364 | Usage: |
|---|
| 365 | $MYNAME chattr attribute value [ file | directory ] |
|---|
| 366 | |
|---|
| 367 | The chattr subcommand alters the confman attributes of files in the |
|---|
| 368 | repository. These attributes can be used to store information such as |
|---|
| 369 | file permissions, ownership, comment characters, syntax checkers, and |
|---|
| 370 | even commands to execute when changing the file. |
|---|
| 371 | |
|---|
| 372 | EOF |
|---|
| 373 | ;; |
|---|
| 374 | rmattr ) |
|---|
| 375 | cat<<EOF |
|---|
| 376 | $MYNAME manages configuration files |
|---|
| 377 | |
|---|
| 378 | Usage: |
|---|
| 379 | $MYNAME rmattr attribute [ file | directory ] |
|---|
| 380 | |
|---|
| 381 | The rmattr subcommand removes the confman attributes of files in the |
|---|
| 382 | repository. These attributes can be used to store information such as |
|---|
| 383 | file permissions, ownership, comment characters, syntax checkers, and |
|---|
| 384 | even commands to execute when changing the file. |
|---|
| 385 | |
|---|
| 386 | EOF |
|---|
| 387 | ;; |
|---|
| 388 | cho* ) |
|---|
| 389 | cat <<EOF |
|---|
| 390 | $MYNAME manages configuration files |
|---|
| 391 | |
|---|
| 392 | Usage: |
|---|
| 393 | $MYNAME chown [ -R ] owner [ file | directory ] |
|---|
| 394 | |
|---|
| 395 | The chown command works like it's unix equivalent. It does not support |
|---|
| 396 | user:group notation. The only option it will take is -R for recursive. |
|---|
| 397 | |
|---|
| 398 | EOF |
|---|
| 399 | ;; |
|---|
| 400 | chg* ) |
|---|
| 401 | cat <<EOF |
|---|
| 402 | $MYNAME manages configuration files |
|---|
| 403 | |
|---|
| 404 | Usage: |
|---|
| 405 | $MYNAME chgrp group [ file | directory ] |
|---|
| 406 | |
|---|
| 407 | The chgrp command works like it's unix equivalent. The only option it will take |
|---|
| 408 | is -R for recursive. |
|---|
| 409 | |
|---|
| 410 | EOF |
|---|
| 411 | ;; |
|---|
| 412 | chm* ) |
|---|
| 413 | cat <<EOF |
|---|
| 414 | $MYNAME manages configuration files |
|---|
| 415 | |
|---|
| 416 | Usage: |
|---|
| 417 | $MYNAME chmod mode [ file | directory ] |
|---|
| 418 | |
|---|
| 419 | The chmod command works like it's unix equivalent. Note that it will only |
|---|
| 420 | accept octets as permissions -- it will not interpret symbolic permissions |
|---|
| 421 | correctly. The only option it will take is -R for recursive. |
|---|
| 422 | |
|---|
| 423 | EOF |
|---|
| 424 | ;; |
|---|
| 425 | chc* ) |
|---|
| 426 | cat <<EOF |
|---|
| 427 | $MYNAME manages configuration files |
|---|
| 428 | |
|---|
| 429 | Usage: |
|---|
| 430 | $MYNAME chcom comment-character [ file | directory ] |
|---|
| 431 | |
|---|
| 432 | The chcom subcommand takes a file or directory as an argument and changes the |
|---|
| 433 | comment string associated with it. This will typically only be useful when |
|---|
| 434 | confman has guessed the comment character of your file incorrectly. |
|---|
| 435 | |
|---|
| 436 | EOF |
|---|
| 437 | ;; |
|---|
| 438 | chl* ) |
|---|
| 439 | cat <<EOF |
|---|
| 440 | $MYNAME manages configuration files |
|---|
| 441 | |
|---|
| 442 | Usage: |
|---|
| 443 | $MYNAME chln target link_name |
|---|
| 444 | |
|---|
| 445 | The chln subcommand takes a confman link as an argument and changes the |
|---|
| 446 | target on the live filesystem to which it points. This works for |
|---|
| 447 | "simulated" symlinks to files on the live filesystem, not on actual |
|---|
| 448 | symlinks within your confman working copy. |
|---|
| 449 | EOF |
|---|
| 450 | ;; |
|---|
| 451 | checkl* ) |
|---|
| 452 | cat <<EOF |
|---|
| 453 | $MYNAME manages configuration files |
|---|
| 454 | |
|---|
| 455 | Usage: |
|---|
| 456 | $MYNAME checklook module |
|---|
| 457 | |
|---|
| 458 | The checklook command peeks into the checkpoints for the specified module |
|---|
| 459 | and gives you a listing of current checkpoints with some other cool info. |
|---|
| 460 | This command does not alter the repository. |
|---|
| 461 | |
|---|
| 462 | EOF |
|---|
| 463 | ;; |
|---|
| 464 | checkn* ) |
|---|
| 465 | cat <<EOF |
|---|
| 466 | $MYNAME manages configuration files |
|---|
| 467 | |
|---|
| 468 | Usage: |
|---|
| 469 | $MYNAME checknew module name |
|---|
| 470 | |
|---|
| 471 | The newcheck command creates a named checkpoint for the specified module. |
|---|
| 472 | This change is committed to the repository immediately. |
|---|
| 473 | |
|---|
| 474 | EOF |
|---|
| 475 | ;; |
|---|
| 476 | checkc* ) |
|---|
| 477 | cat <<EOF |
|---|
| 478 | $MYNAME manages configuration files |
|---|
| 479 | |
|---|
| 480 | Usage: |
|---|
| 481 | $MYNAME checkclear module name |
|---|
| 482 | |
|---|
| 483 | The rmcheck command clears a named checkpoint from the specified module. |
|---|
| 484 | This change is committed to the repository immediately. |
|---|
| 485 | |
|---|
| 486 | EOF |
|---|
| 487 | ;; |
|---|
| 488 | ro* ) |
|---|
| 489 | cat <<EOF |
|---|
| 490 | $MYNAME manages configuration files |
|---|
| 491 | |
|---|
| 492 | Usage: |
|---|
| 493 | $MYNAME rollback module [ checkpoint | YYYYMMDD [HHMM] ] |
|---|
| 494 | |
|---|
| 495 | The rollback command first rolls your working copy of module back to the |
|---|
| 496 | named checkpoint. You can optionally roll-back to a specific point in time |
|---|
| 497 | using a date (and optionally time) as specified in the usage statement. |
|---|
| 498 | This change is immediately committed to the repository. |
|---|
| 499 | |
|---|
| 500 | After the rollback is complete, we perform the equivalent of a: |
|---|
| 501 | $MYNAME commit |
|---|
| 502 | |
|---|
| 503 | EOF |
|---|
| 504 | ;; |
|---|
| 505 | rec* ) |
|---|
| 506 | cat <<EOF |
|---|
| 507 | $MYNAME manages configuration files |
|---|
| 508 | |
|---|
| 509 | Usage: |
|---|
| 510 | $MYNAME recipe [ get | list ] |
|---|
| 511 | $MYNAME recipe [ print | edit ] [ recipe_name ] |
|---|
| 512 | $MYNAME recipe set recipe_name |
|---|
| 513 | $MYNAME recipe [ create | remove ] [ -F file | -m msg ] recipe_name |
|---|
| 514 | |
|---|
| 515 | The recipe command provides an interface to manage confman recipes. |
|---|
| 516 | |
|---|
| 517 | create Create a recipe with the given name |
|---|
| 518 | edit Edit a recipe with the given name |
|---|
| 519 | get List the host's recipe |
|---|
| 520 | list List all recipes |
|---|
| 521 | print Print the given recipe (defaults to this host's recipe) |
|---|
| 522 | remove Delete a recipe with the given name |
|---|
| 523 | set Set the host's recipe to the given name |
|---|
| 524 | |
|---|
| 525 | EOF |
|---|
| 526 | ;; |
|---|
| 527 | * ) |
|---|
| 528 | print_usage 1 |
|---|
| 529 | ;; |
|---|
| 530 | esac |
|---|
| 531 | return 0 |
|---|
| 532 | } |
|---|