NexentaOS GNU/SUN personalities
The default behavior of NexentaOS is to search for execution binaries in order described in the PATH. Standard locations such as /usr/bin and /usr/sbin all populated with GNU binaries, which makes NexentaOS behave as GNU system. SUN binaries saved in /usr/sun/bin and /usr/sun/sbin locations and system could be forced to use SUN-like personality by utilizing SUN_PERSONALITY environment variable.
SUN_PERSONALITY execve() system call logic implemented and it is finally allows Solaris-centric scripts to be executed in NexentaOS without modifications.
Simple SUN_PERSONALITY=1 environment variable will switch execution paths on the fly to look on /usr/sun/{bin,sbin} first.
nexenta-pkgcmd package using this during "alien" SVR4=>Debian on-the fly conversion to enable solaris-like environment for SVR4 maintainers scripts.
Example of usage pkgadd to add QLogic SVR4 packaged drivers:
# pkgadd -d Qlogic-x86 Transferring package instance sunwqlc_5.11-1_solaris-i386.deb generated Transferring package instance sunwqlcu_5.11-1_solaris-i386.deb generated (Reading database ... 62453 files and directories currently installed.) Preparing to replace sunwqlc 5.11-1 (using sunwqlc_5.11-1_solaris-i386.deb) ... Unpacking replacement sunwqlc ... Preparing to replace sunwqlcu 5.11-1 (using sunwqlcu_5.11-1_solaris-i386.deb) ... Unpacking replacement sunwqlcu ... Setting up sunwqlc (5.11-1) ... Reboot client to install driver. Setting up class: none /kernel/drv/amd64/qlc 4331 blocks Setting up class: none /kernel/drv/qlc 4331 blocks Setting up class: qlc /kernel/drv/qlc.conf Setting up sunwqlcu (5.11-1) ... # dpkg -l|grep sunwqlc ii sunwqlc 5.11-1 Qlogic ISP 2200/2202 Fibre Channel Device Dr ii sunwqlcu 5.11-1 Qlogic Fibre Channel Adapter Utilities (usr)
Those folks who just want to use real Solaris-like environment on NexentaOS could simple type:
# SUN_PERSONALITY=1 sh $
All SUN commands like ls,rm,sed,nawk,etc will be on the path even if you execute them with absolute path, i.e. /usr/bin/sed
