Add LSB headers to some init scripts (grml-home,grml-misc and firewall)
[grml-etc.git] / etc / init.d / grml-home
1 #!/bin/sh
2 # Filename:      grml-home
3 # Purpose:       copy skeleton files if not already present
4 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2.
7 # Latest change: Don Sep 28 16:36:03 CEST 2006 [mika]
8 ################################################################################
9 ### BEGIN INIT INFO
10 # Provides:          grml-home
11 # Required-Start:    $all
12 # Required-Stop:
13 # Default-Start:     S 2 3 4 5
14 # Default-Stop:
15 ### END INIT INFO
16
17 # user with UID 1000
18 fstabuser=$(getent passwd 1000 | cut -d: -f1)
19
20 if [ -r /etc/grml_cd ] ; then # run only in live modus
21   chown "${fstabuser}": /home/"$fstabuser" # this is important for the home=/dev/ice bootparam
22   su -s /bin/sh "$fstabuser" -c "rsync -Ha --ignore-existing /etc/skel/ /home/${fstabuser}/"
23   #  ^^^^^^^^^^
24   #  this is important to prevent startup of the zsh/newuser module
25 fi
26
27 ## END OF FILE #################################################################