source: package_branches/invirt-base/hvirt/debian/invirt-base.init @ 2796

Last change on this file since 2796 was 2787, checked in by gdb, 15 years ago

Added init script for generating conf

  • Property svn:executable set to *
File size: 676 bytes
Line 
1#! /bin/bash
2### BEGIN INIT INFO
3# Provides:          invirt-base
4# Required-Start:    $local_fs $remote_fs
5# Required-Stop:     $local_fs $remote_fs
6# Default-Start:     2 3 4 5
7# Default-Stop:      0 1 6
8# Short-Description: invirt base config generator
9# Description:       Re-generate invirt config; namely default kerberos realm.
10### END INIT INFO
11
12# Author: Invirt Project <invirt@mit.edu>
13PATH=/sbin:/usr/sbin:/bin:/usr/bin
14
15if [ -x /usr/bin/invirt-getconf -a -f /etc/krb5.conf.invirt ]; then
16    /usr/bin/perl -i -e '$r = `/usr/bin/invirt-getconf kerberos.realm`; chomp($r);
17      while(<>) { s/^([ \t]*default_realm *=).*$/\1 $r/m; print; }' /etc/krb5.conf.invirt
18fi
Note: See TracBrowser for help on using the repository browser.