File: 80-misc

package info (click to toggle)
fai 6.5.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,080 kB
  • sloc: sh: 6,721; perl: 5,625; makefile: 138
file content (21 lines) | stat: -rwxr-xr-x 533 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/bash

error=0 ; trap "error=$((error|1))" ERR

# add a $username user account
if [ -n "$username" ]; then
    if ! $ROOTCMD getent passwd $username ; then
	$ROOTCMD adduser -c "$username user" $username
	$ROOTCMD usermod -p "$USERPW" $username
    fi
fi

# enable graphical login screen, make run level 5 as default
if [ -f $target/usr/sbin/gdm ]; then
    fai-sed 's/id:3:initdefault:/id:5:initdefault:/' /etc/inittab
    # do not run this tool
    echo "RUN_FIRSTBOOT=NO" > $target/etc/sysconfig/firstboot
fi

exit $error