CONFIG_BLINDSOUND='yes' # play 'beep' and play welcome message
CONFIG_BLIND='yes' # check for blind option or brltty
CONFIG_CDROM_PERM='yes' # for burning on IDE-CD-Roms, k3b (and others) check for special permissions
-CONFIG_CONFIG='yes' # do we want config unpacking to work?
+CONFIG_CONFIG='yes' # do we want config unpacking to work?
CONFIG_CONSOLE='yes' # activate mgetty when using console=... as bootparam
CONFIG_CREATE_MNT_DIRS='no' # create /mnt-directories
CONFIG_DEBOOTSTRAP='yes' # support automatic installation of Debian via grml-deboostrap
CONFIG_DMA='yes' # Enable DMA for all IDE drives
CONFIG_EXTRACT='yes' # specify which (only in combination with bootparam myconfig/netconfig useful)
CONFIG_FAST='yes' # skip startup of w3m on tty1
-CONFIG_FINDDCSDIR='yes' # search for a debs, config, scripts directory
+CONFIG_FINDDCSDIR='yes' # search for a debs, config, scripts directory
CONFIG_FIREWIRE_DEV='no' # bugfix for kernel >=2.6.11 - create some firewire-devices
CONFIG_FIX_PASSWD='yes' # fix unionfs-problem with passwd
CONFIG_FIX_UNIONFS='yes' # fix/workaround for unionfs
CONFIG_NETCONFIG='yes' # download configuration archive provided by bootoption netconfig=...
CONFIG_NETSCRIPT='yes' # download and run script/executable provided by bootoption netscript=...
CONFIG_NETIPV6='yes' # check for bootparam ipv6
-CONFIG_PARTCONF='yes' # do we want partconf to work?
+CONFIG_PARTCONF='yes' # do we want partconf to work?
CONFIG_PASSWD='yes' # set password via bootparam passwd
CONFIG_PCMCIA='no' # check for pcmcia and start cardmgr
CONFIG_QEMU='yes' # qemu specific stuff
-CONFIG_SCRIPTS='yes' # execute scripts from the scripts option
+CONFIG_SCRIPTS='yes' # execute scripts from the scripts option
CONFIG_SERVICES='yes' # check for services to run, provided via bootparam
CONFIG_SETKEYCODES='yes' # run setkeycodes when bootoption setkeycodes found
CONFIG_SMALL='yes' # use a less "bloat" /etc/inittab for small computer with less RAM
CONFIG_TOHD='yes' # bootoption tohd=...
CONFIG_USERFSTAB='yes' # check for username of uid 1000
CONFIG_VMWARE='yes' # vmware specific stuff (use xorg.conf.vmware)
+CONFIG_VNC='yes' # check for bootparam vnc
CONFIG_WELCOME='yes' # play welcome sound (audio)
CONFIG_WONDERSHAPER='yes' # start wondershaper with options provided via bootparam
CONFIG_XSTARTUP='yes' # start X window system via grml-x [only in live-mode]
}
# }}}
+# {{{ autostart of x11vnc
+config_vnc(){
+
+USER=grml # TODO: make it dynamically configurable
+if checkbootparam 'vnc' ; then
+ VNC_PASSWD=''
+ VNC_PASSWD="$(getbootparam 'vnc' 2>>$DEBUG)"
+ einfo "Bootoption vnc found, trying to set password for user $USER."
+ eindent
+ if [ -z "$VNC_PASSWD" ] ; then
+ if [ -x /usr/bin/apg ] ; then
+ VNC_PASSWD="$(apg -M NL -a 0 -m 8 -x 12 -n 1)"
+ elif [ -x /usr/bin/gpw ] ; then
+ VNC_PASSWD="$(gpw 1)"
+ elif [ -x /usr/bin/pwgen ] ; then
+ VNC_PASSWD="$(pwgen -1 8)"
+ elif [ -x /usr/bin/hexdump ] ; then
+ VNC_PASSWD="$(dd if=/dev/urandom bs=14 count=1 2>/dev/null | hexdump | awk '{print $3 $4}')"
+ elif [ -n "$RANDOM" ] ; then
+ VNC_PASSWD="${USER}${RANDOM}"
+ else
+ VNC_PASSWD=''
+ eerror "Empty passphrase and neither pwgen nor hexdump nor \$RANDOM found. Skipping."
+ eend 1
+ fi
+
+ if [ -n "$VNC_PASSWD" ] ; then
+ ewarn "No given password for vnc found. Using random password: $VNC_PASSWD" ; eend 0
+ fi
+ fi
+ eoutdent
+
+ # finally check if we have a password we can use:
+ if [ -n "$VNC_PASSWD" ] ; then
+
+ VNCDIR="/home/${USER}/.vnc"
+ [ -d "$VNCDIR" ] || mkdir "$VNCDIR"
+
+ if [ ! -x /usr/bin/x11vnc ] ; then
+ eerror "Error: x11vnc not found - can not set up vnc. Please make sure to install the x11vnc package."
+ eend 1
+ else
+ /usr/bin/x11vnc -storepasswd "$VNC_PASSWD" "$VNCDIR"/passwd ; eend $?
+ /bin/chown -R "$USER": "$VNCDIR"
+ fi
+ fi
+fi
+}
+# }}}
+
# {{{ set password for user grml
config_passwd(){
if checkbootparam 'passwd' >>$DEBUG 2>&1; then